Closed anandology closed 2 years ago
done. Implemented by adding multiple modes. The default mode is exec
and the other mode is test
.
The API is slightly different than proposed.
$ curl -H 'x-falcon-mode: test' -F square.py=@square.py -F test_square.py=@test_square.py http://localhost:8010/runtimes/python
{
"testcases": [
{
"filename": "test_square.py",
"name": "test_square",
"time_taken": "0.001",
"outcome": "passed"
}
],
"stats": {
"tests": "1",
"passed": 1,
"failed": 0,
"time_taken": "0.049"
}
}
One of the possible uses of Falcon would be to verify of the submitted code is correct by running tests against it.
One approach to make this possible is by enabling two different modes for each runtime
exec
andtest
. Theexec
would be the default option with the existing behavior. Thetest
mode provides the output as JSON.API
Exeucute come code:
Test some code: