diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2019-10-07 10:54:42 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-10-07 11:15:28 +0200 |
commit | ad4d4bdbbe182eede4079be1e0ea345288a3e3df (patch) | |
tree | d123fedc7384362e978b9e5ef3f0cbfabf7ed5a1 | |
parent | dbcc83daa56b3cba415acff079809b3e77ae069c (diff) |
Add test for POST /image/create command
This test covers correction of the command.
-rwxr-xr-x | tests/run-tests.sh | 1 | ||||
-rw-r--r-- | tests/setup_image.json | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 0ea97bc..f340f01 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -14,3 +14,4 @@ curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/hardware -d @pos curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/software -d @post_clients.json curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/image/create -d @create_image.json curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/image/restore -d @restore_image.json +curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/image/setup -d @setup_image.json diff --git a/tests/setup_image.json b/tests/setup_image.json new file mode 100644 index 0000000..0135e20 --- /dev/null +++ b/tests/setup_image.json @@ -0,0 +1 @@ +{ "clients" : [ "192.168.56.11" ], "disk" : "1", "cache" : "1", "cache_size" : "0", "partition_setup": [{"partition": "1", "code": "LINUX", "filesystem": "EMPTY", "size": "498688", "format": "0"}, {"partition": "2", "code": "LINUX-SWAP", "filesystem": "EMPTY", "size": "199987", "format": "0"}, {"partition": "3", "code": "LINUX", "filesystem": "EMPTY", "size": "31053824", "format": "0"}, {"partition": "4", "code": "EMPTY", "filesystem": "EMPTY", "size": "0", "format": "0"}]} |