Updates to test env and A1function test
Issue-ID: NONRTRIC-303
Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Change-Id: Ic6c206182b01d45bce539d06fc3f506718685565
diff --git a/test/auto-test/FTC1100.sh b/test/auto-test/FTC1100.sh
index a61f1bb..63c2931 100755
--- a/test/auto-test/FTC1100.sh
+++ b/test/auto-test/FTC1100.sh
@@ -44,9 +44,13 @@
set_ecs_trace
# Setup prodstub sim to accept calls for producers, types and jobs
-prodstub_arm_supervision 200 prod-a
-prodstub_arm_supervision 200 prod-b
-prodstub_arm_supervision 200 prod-c
+prodstub_arm_producer 200 prod-a
+prodstub_arm_producer 200 prod-b
+prodstub_arm_producer 200 prod-c
+
+prodstub_arm_producer 200 prod-d
+prodstub_arm_type 200 prod-d type4
+prodstub_arm_job_create 200 prod-d job8
prodstub_arm_type 200 prod-a type1
prodstub_arm_type 200 prod-b type2
@@ -56,22 +60,22 @@
prodstub_arm_type 200 prod-b type1
prodstub_disarm_type 200 prod-b type1
-prodstub_arm_create 200 prod-a job1
-prodstub_arm_create 200 prod-a job2
-prodstub_arm_create 200 prod-b job3
+prodstub_arm_job_create 200 prod-a job1
+prodstub_arm_job_create 200 prod-a job2
+prodstub_arm_job_create 200 prod-b job3
-prodstub_arm_delete 200 prod-a job1
-prodstub_arm_delete 200 prod-a job2
-prodstub_arm_delete 200 prod-b job3
+prodstub_arm_job_delete 200 prod-a job1
+prodstub_arm_job_delete 200 prod-a job2
+prodstub_arm_job_delete 200 prod-b job3
-prodstub_arm_create 200 prod-b job4
-prodstub_arm_create 200 prod-a job4
+prodstub_arm_job_create 200 prod-b job4
+prodstub_arm_job_create 200 prod-a job4
-prodstub_arm_create 200 prod-b job5
-prodstub_arm_create 200 prod-a job5
-prodstub_arm_delete 200 prod-a job5
+prodstub_arm_job_create 200 prod-b job5
+prodstub_arm_job_create 200 prod-a job5
+prodstub_arm_job_delete 200 prod-a job5
-prodstub_arm_create 200 prod-b job6
+prodstub_arm_job_create 200 prod-b job6
# ecs status
ecs_api_service_status 200
@@ -211,7 +215,28 @@
ecs_api_edp_delete_producer 204 prod-b
-check_sndc_logs
+prodstub_equal create/prod-d/job8 0
+prodstub_equal delete/prod-d/job8 0
+
+ecs_api_edp_put_producer 201 prod-d http://producer-stub:8092/callbacks/create/prod-d http://producer-stub:8092/callbacks/delete/prod-d http://producer-stub:8092/callbacks/supervision/prod-d type4 testdata/ecs/ei-type-1.json
+
+ecs_api_a1_get_job_ids 200 type4 NOWNER EMPTY
+
+ecs_api_a1_put_job 201 type4 job8 http://localhost:80/target8 ric4 testdata/ecs/job-template.json
+
+prodstub_equal create/prod-d/job8 1
+prodstub_equal delete/prod-d/job8 0
+
+ecs_api_a1_get_job_ids 200 type4 NOWNER job8
+
+ecs_api_edp_put_producer 200 prod-d http://producer-stub:8092/callbacks/create/prod-d http://producer-stub:8092/callbacks/delete/prod-d http://producer-stub:8092/callbacks/supervision/prod-d NOTYPE
+
+ecs_api_a1_get_job_ids 404 type4 NOWNER
+
+prodstub_equal create/prod-d/job8 1
+prodstub_equal delete/prod-d/job8 0
+
+check_sdnc_logs
check_ecs_logs
diff --git a/test/auto-test/FTC150.sh b/test/auto-test/FTC150.sh
index ead424c..bb527be 100755
--- a/test/auto-test/FTC150.sh
+++ b/test/auto-test/FTC150.sh
@@ -29,6 +29,11 @@
#### TEST BEGIN ####
+FLAVOUR="ORAN"
+if [[ $SDNC_A1_CONTROLLER_IMAGE == *"onap"* ]]; then
+ FLAVOUR="ONAP"
+fi
+
generate_uuid
#Test agent and simulator protocol versions (others are http only)
@@ -83,9 +88,18 @@
controller_api_get_A1_policy_type 200 OSC ricsim_g1_1 1 testdata/OSC/sim_1.json
controller_api_get_A1_policy_type 404 OSC ricsim_g1_1 99
- controller_api_put_A1_policy 202 OSC ricsim_g1_1 1 4000 testdata/OSC/pi1_template.json
+ RESP=202
+ if [ $FLAVOUR == "ONAP" ]; then
+ RESP=200
+ fi
+ controller_api_put_A1_policy $RESP OSC ricsim_g1_1 1 4000 testdata/OSC/pi1_template.json
controller_api_put_A1_policy 404 OSC ricsim_g1_1 5 1001 testdata/OSC/pi1_template.json
- controller_api_put_A1_policy 201 STD ricsim_g2_1 5000 testdata/STD/pi1_template.json
+
+ RESP=201
+ if [ $FLAVOUR == "ONAP" ]; then
+ RESP=200
+ fi
+ controller_api_put_A1_policy $RESP STD ricsim_g2_1 5000 testdata/STD/pi1_template.json
controller_api_get_A1_policy_ids 200 OSC ricsim_g1_1 1 4000
controller_api_get_A1_policy_ids 200 STD ricsim_g2_1 5000
@@ -97,8 +111,17 @@
controller_api_get_A1_policy_status 200 OSC ricsim_g1_1 1 4000 "$VAL" "false"
controller_api_get_A1_policy_status 200 STD ricsim_g2_1 5000 "UNDEFINED"
- controller_api_delete_A1_policy 202 OSC ricsim_g1_1 1 4000
- controller_api_delete_A1_policy 204 STD ricsim_g2_1 5000
+ RESP=202
+ if [ $FLAVOUR == "ONAP" ]; then
+ RESP=200
+ fi
+ controller_api_delete_A1_policy $RESP OSC ricsim_g1_1 1 4000
+
+ RESP=204
+ if [ $FLAVOUR == "ONAP" ]; then
+ RESP=200
+ fi
+ controller_api_delete_A1_policy $RESP STD ricsim_g2_1 5000
check_sdnc_logs
diff --git a/test/auto-test/testdata/ecs/job-template2.json b/test/auto-test/testdata/ecs/job-template2.json
new file mode 100644
index 0000000..c1126ea
--- /dev/null
+++ b/test/auto-test/testdata/ecs/job-template2.json
@@ -0,0 +1,6 @@
+{
+ "jobparam1":"value1_XXXX",
+ "jobparam2":"value2_XXXX",
+ "jobparam3":"value3_XXXX",
+ "jobparam4":"value3_XXXX"
+}
\ No newline at end of file