From ad4d4bdbbe182eede4079be1e0ea345288a3e3df Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gómez Date: Mon, 7 Oct 2019 10:54:42 +0200 Subject: Add test for POST /image/create command This test covers correction of the command. --- tests/run-tests.sh | 1 + tests/setup_image.json | 1 + 2 files changed, 2 insertions(+) create mode 100644 tests/setup_image.json (limited to 'tests') 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"}]} -- cgit v1.2.3-18-g5258