diff options
author | 2020-10-15 14:57:57 +0530 | |
---|---|---|
committer | 2020-11-12 14:52:33 +0100 | |
commit | d3cdace51db473c93540229da3a0fd061120957c (patch) | |
tree | d2d4f1031c7d577d51fe27b6daf1a1e80cdb409d /cds-regression-test/test/remote-ansible/init-mockserver.sh | |
parent | 8e75c091c8f2079b8ae59ae544fbd19bbef3f963 (diff) |
cds-bash script package
Issue-ID: CCSDK-2913
Change-Id: I2f97b0c78314019d5002e8563c4e433ae5e816b9
Signed-off-by: SantoshB <santosh.bayas@amdocs.com>
Signed-off-by: mrichomme <morgan.richomme@orange.com>
Diffstat (limited to 'cds-regression-test/test/remote-ansible/init-mockserver.sh')
-rwxr-xr-x | cds-regression-test/test/remote-ansible/init-mockserver.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/cds-regression-test/test/remote-ansible/init-mockserver.sh b/cds-regression-test/test/remote-ansible/init-mockserver.sh new file mode 100755 index 0000000..c737b9e --- /dev/null +++ b/cds-regression-test/test/remote-ansible/init-mockserver.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +CBA_NAME="remote-ansible" +DIR_PAYLOADS="$TEST_DIRECTORY/$CBA_NAME/mock-payloads" + +# JOB TEMPLATE +echo "Mocking Job Template route..." +JT_PAYLOAD="job-template.json" +curl -v -X PUT "http://$MOCKSERVER_URL:$MOCKSERVER_PORT/mockserver/expectation" -d "@$DIR_PAYLOADS/$JT_PAYLOAD" + +# JOB TEMPLATE ERROR +echo "Mocking Job Template Error route..." +JT_ERR_PAYLOAD="job-template-error.json" +curl -v -X PUT "http://$MOCKSERVER_URL:$MOCKSERVER_PORT/mockserver/expectation" -d "@$DIR_PAYLOADS/$JT_ERR_PAYLOAD" + +# JOB TEMPLATE LAUNCH - GET +echo "Mocking Job Template Launch GET route..." +GET_JT_LAUNCH_PAYLOAD="get_job-template-launch.json" +curl -v -X PUT "http://$MOCKSERVER_URL:$MOCKSERVER_PORT/mockserver/expectation" -d "@$DIR_PAYLOADS/$GET_JT_LAUNCH_PAYLOAD" + +# JOB TEMPLATE LAUNCH +echo "Mocking Inventory route..." +INVENTORY_PAYLOAD="inventory.json" +curl -v -X PUT "http://$MOCKSERVER_URL:$MOCKSERVER_PORT/mockserver/expectation" -d "@$DIR_PAYLOADS/$INVENTORY_PAYLOAD" + +# JOB TEMPLATE LAUNCH - POST +echo "Mocking Job Template Launch POST route..." +POST_JT_LAUNCH_PAYLOAD="post_job-template-launch.json" +curl -v -X PUT "http://$MOCKSERVER_URL:$MOCKSERVER_PORT/mockserver/expectation" -d "@$DIR_PAYLOADS/$POST_JT_LAUNCH_PAYLOAD" + +# JOB EXECUTION +echo "Mocking Job Execution route..." +JOB_EXECUTION_PAYLOAD="job-execution.json" +curl -v -X PUT "http://$MOCKSERVER_URL:$MOCKSERVER_PORT/mockserver/expectation" -d "@$DIR_PAYLOADS/$JOB_EXECUTION_PAYLOAD" + +# JOB OUTPUT +echo "Mocking Job Output route..." +JOB_OUTPUT_PAYLOAD="job-output.json" +curl -v -X PUT "http://$MOCKSERVER_URL:$MOCKSERVER_PORT/mockserver/expectation" -d "@$DIR_PAYLOADS/$JOB_OUTPUT_PAYLOAD" |