Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback #1

Open
wants to merge 33 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d8521a0
Setting up GitHub Classroom Feedback
github-classroom[bot] Apr 19, 2022
62a85cc
Update GitHub Classroom Autograding
github-classroom[bot] Apr 29, 2022
7389ae7
Update GitHub Classroom Autograding Workflow
github-classroom[bot] Apr 29, 2022
6d71b61
server comm
bvalient May 2, 2022
c544829
Merge branch 'main' of github.com:comp426-2022-spring/a03-bvalient
bvalient May 2, 2022
136e0e9
moved
bvalient May 2, 2022
3438c75
.json
bvalient May 2, 2022
9bf28c6
installed
bvalient May 2, 2022
4e52cd7
some code
bvalient May 2, 2022
9bbf89c
404
bvalient May 2, 2022
7231be1
app.get stuff
bvalient May 2, 2022
18bfb95
functions
bvalient May 2, 2022
35d7f3b
coinflip endpoint
bvalient May 2, 2022
2e656ca
heads
bvalient May 2, 2022
a9a01f1
tails
bvalient May 2, 2022
f7e14f2
rearrange
bvalient May 2, 2022
5ccef3b
params.number
bvalient May 2, 2022
20b086a
no more export
bvalient May 2, 2022
4d94dee
port?
bvalient May 2, 2022
85139df
Port??
bvalient May 2, 2022
0f21003
changes uhhu
bvalient May 2, 2022
56c5acb
hmmmm
bvalient May 2, 2022
82982ab
weirdness
bvalient May 2, 2022
2c54837
grossness
bvalient May 2, 2022
078f726
let's see
bvalient May 2, 2022
a025603
mary poppins
bvalient May 2, 2022
f465536
functions??
bvalient May 2, 2022
a34f5a2
flipacoinfix?
bvalient May 2, 2022
c9402f8
brackets
bvalient May 2, 2022
20770aa
funcs again
bvalient May 2, 2022
8c3b8a0
updated2
bvalient May 2, 2022
bdffcca
Update GitHub Classroom Autograding
github-classroom[bot] May 5, 2022
c7f996f
Update GitHub Classroom Autograding Workflow
github-classroom[bot] May 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 29 additions & 19 deletions .github/classroom/autograding.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"tests": [
{
"name": "Default /app/ endpoint",
"name": "Default endpoint",
"setup": "npm install",
"run": "PORT=\"$(shuf -i 2000-65535 -n 1)\"; (timeout --signal=SIGINT 5 node server.js --port=$PORT; exit 0) & sleep 1s && curl -I http://localhost:${PORT}/app/ && sleep 5s",
"input": "",
"output": "HTTP\\/(1.1|2)\\s*200\\s*(OK)?",
"comparison": "regex",
"timeout": 10,
"points": 7143
"points": 8334
},
{
"name": "Nonexistent endpoint",
Expand All @@ -18,87 +18,97 @@
"output": "HTTP\\/(1.1|2)\\s*404\\s*(Not Found)?",
"comparison": "regex",
"timeout": 10,
"points": 7143
"points": 8334
},
{
"name": "Random coin flip endpoint /app/flip/",
"name": "Random coin flip endpoint",
"setup": "",
"run": "PORT=\"$(shuf -i 2000-65535 -n 1)\"; (timeout --signal=SIGINT 5 node server.js --port=$PORT; exit 0) & sleep 1s && curl http://localhost:${PORT}/app/flip/ && sleep 5s",
"input": "",
"output": "\\{\"flip\":\"(heads|tails)\"\\}",
"comparison": "regex",
"timeout": 10,
"points": 7143
"points": 8334
},
{
"name": "Flip many coins endpoint /app/flips/:number/",
"name": "Flip many coins endpoint",
"setup": "",
"run": "PORT=\"$(shuf -i 2000-65535 -n 1)\"; NUMBER=\"$(shuf -i 100-500 -n 1)\"; (timeout --signal=SIGINT 5 node server.js --port=$PORT; exit 0) & sleep 1s && curl http://localhost:${PORT}/app/flips/${NUMBER}/ && sleep 5s",
"input": "",
"output": "\\{\"raw\":\\[\"(heads|tails)\",.*\\],\"summary\":\\{\"(heads|tails)\":[0-9]{1,3},\"(heads|tails)\":[0-9]{1,3}\\}\\}",
"comparison": "regex",
"timeout": 10,
"points": 7143
"points": 8333
},
{
"name": "Header check /app/flip/",
"name": "Header check flip",
"setup": "",
"run": "PORT=\"$(shuf -i 2000-65535 -n 1)\"; (timeout --signal=SIGINT 5 node server.js --port=$PORT; exit 0) & sleep 1s && curl -I http://localhost:${PORT}/app/flip/ && sleep 5s",
"input": "",
"output": "HTTP\\/(1.1|2)\\s*200\\s*(OK)?",
"comparison": "regex",
"timeout": 10,
"points": 7143
"points": 8333
},
{
"name": "Header check /app/flips/:number/",
"name": "Header check flips",
"setup": "",
"run": "PORT=\"$(shuf -i 2000-65535 -n 1)\"; NUMBER=\"$(shuf -i 100-500 -n 1)\"; (timeout --signal=SIGINT 5 node server.js --port=$PORT; exit 0) & sleep 1s && curl -I http://localhost:${PORT}/app/flips/${NUMBER}/ && sleep 5s",
"input": "",
"output": "HTTP\\/(1.1|2)\\s*200\\s*(OK)?",
"comparison": "regex",
"timeout": 10,
"points": 7143
"points": 8333
},
{
"name": "Call a flip heads at endpoint /app/flip/call/heads/",
"name": "Call a flip heads at endpoint",
"setup": "",
"run": "PORT=\"$(shuf -i 2000-65535 -n 1)\"; (timeout --signal=SIGINT 5 node server.js --port=$PORT; exit 0) & sleep 1s && curl http://localhost:${PORT}/app/flip/call/heads/ && sleep 5s",
"input": "",
"output": "\\{\"call\":\"heads\",\"flip\":\"(heads|tails)\",\"result\":\"(win|lose)\"\\}",
"comparison": "regex",
"timeout": 10,
"points": 7143
"points": 8333
},
{
"name": "Call a flip tails at endpoint /app/flip/call/tails/",
"name": "Call a flip tails at endpoint",
"setup": "",
"run": "PORT=\"$(shuf -i 2000-65535 -n 1)\"; (timeout --signal=SIGINT 5 node server.js --port=$PORT; exit 0) & sleep 1s && curl http://localhost:${PORT}/app/flip/call/tails/ && sleep 5s",
"input": "",
"output": "\\{\"call\":\"tails\",\"flip\":\"(heads|tails)\",\"result\":\"(win|lose)\"\\}",
"comparison": "regex",
"timeout": 10,
"points": 7143
"points": 8333
},
{
"name": "Header check /app/flip/call/heads/",
"name": "Header check",
"setup": "",
"run": "PORT=\"$(shuf -i 2000-65535 -n 1)\"; (timeout --signal=SIGINT 5 node server.js --port=$PORT; exit 0) & sleep 1s && curl -I http://localhost:${PORT}/app/flip/call/heads/ && sleep 5s",
"input": "",
"output": "HTTP\\/(1.1|2)\\s*200\\s*(OK)?",
"comparison": "regex",
"timeout": 10,
"points": 7143
"points": 8333
},
{
"name": "Header check /app/flip/call/tails/",
"name": "Header check",
"setup": "",
"run": "PORT=\"$(shuf -i 2000-65535 -n 1)\"; (timeout --signal=SIGINT 5 node server.js --port=$PORT; exit 0) & sleep 1s && curl -I http://localhost:${PORT}/app/flip/call/tails/ && sleep 5s",
"input": "",
"output": "HTTP\\/(1.1|2)\\s*200\\s*(OK)?",
"comparison": "regex",
"timeout": 10,
"points": 7142
"points": 8333
},
{
"name": "Node version",
"setup": "",
"run": "node -v",
"input": "",
"output": "",
"comparison": "included",
"timeout": 10,
"points": null
}
]
}
Loading