Closed Spetastian closed 8 years ago
I see that the tests fail because the log-folder cannot be found. The log folder was a part of the repo at first but i thought that was strange since its in the gitignore-file.
Added the new scripts in the build lifecycle. The build fails on this:
$ python ./owtf.sh setup File "./owtf.sh", line 8 function setup { ^ SyntaxError: invalid syntax The command "python ./owtf.sh setup" failed and exited with 1 during . Your build has been stopped.
How will the commands endpoint work out when there are more than one container?
Django wont create all the log files so they need to be in the repo, and should be in the .gitignore so we dont push log stuff to the repo.
This is not a python file. I guess it could be run with: bash -c ./owtf.sh
$ python ./owtf.sh setup File "./owtf.sh", line 8 function setup { ^ SyntaxError: invalid syntax The command "python ./owtf.sh setup" failed and exited with 1 during . Your build has been stopped.
Every "code object" would probably just have a list of commands as such:
[ { "code": "666", "target": "", commands: [ {"image": "owtfvalhallatestcontainer:0.1", "noise": "passive", "command": "sleep 5s", "description": "Test"}, {"image": "owtfvalhallatestcontainer:0.2", "noise": "passive", "command": "sleep 5s", "description": "Test"} ]} ]
I am a little unsure about removing the log files, if the application is not set up with the ./owtf setup script, there will be an error that the log files are missing.
Response from commands endpoint now looks like this:
[ { "code": "666", "target": "", "image": "owtfvalhallatestcontainer:0.1", "noise": "passive", "command": "sleep 5s", "description": "Test" } ]
Instead of this:
{ "666": [ { "code": "666", "target": "", "image": "owtfvalhallatestcontainer:0.1", "noise": "passive", "command": "sleep 5s", "description": "Test" } ] }
Its a list of objects just like the containers from the API.