From 467cbbad0e5f77dade228f7f6c7bef7526735ac3 Mon Sep 17 00:00:00 2001 From: Le Zhang Date: Wed, 21 Aug 2024 09:51:32 -0400 Subject: [PATCH] Issue open-horizon#3433 - MMSinCluster: add e2edev test cases Signed-off-by: Le Zhang --- .../k8s-mms-operator/k8s-mms-operator.tar.gz | Bin 0 -> 2710 bytes .../k8s-mms-operator/node.policy.json | 1 + .../k8s_deploy/k8s-mms-operator/node_ui.json | 27 ++++++ test/gov/service_apireg.sh | 86 ++++++++++++++++++ 4 files changed, 114 insertions(+) create mode 100644 test/gov/input_files/k8s_deploy/k8s-mms-operator/k8s-mms-operator.tar.gz create mode 100644 test/gov/input_files/k8s_deploy/k8s-mms-operator/node.policy.json create mode 100644 test/gov/input_files/k8s_deploy/k8s-mms-operator/node_ui.json diff --git a/test/gov/input_files/k8s_deploy/k8s-mms-operator/k8s-mms-operator.tar.gz b/test/gov/input_files/k8s_deploy/k8s-mms-operator/k8s-mms-operator.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f8fb637cf3d6fd6d40fdb6dfcb7dab0c0d8b0617 GIT binary patch literal 2710 zcmV;H3TgEpiwFqaqr_$a18;C;a$$6DaxQdXascgHOLOBk6871@0_8a*sR}7klI4kN zFJ6ylGL?C_Y;U&q}txBh$nM@MPsq|5b6VsM;VE-DtU_#EpA^z$7VLxVuM%2*BJ|Timnb7!)5Spg`bv9)xVTRf135^-B zhq<{gZ5hWCFh&x>Sm%gd;fUVuxuJ|xnXtsTeQX=07&R>NrmG2=OF@&lCsU@Vk!s6~ zlq%!N*e6v-B2|z^JuFZsotPv+1Ak z4A$}TITuVVdB~2#P-clKXG111Fhc+bw+*%b((c*O6O+F)|35tM7qlz?j|Ss<{tu3V zpv(WyLazwqvzTi<0W>j^L^97Jr0@cN{{e@@gHDGB9SeWA^I%_Pg4twU90OK!9yvIG zKZ_YWt`eY{=*feG#np7{vRFC>yrcDNk#*wgTWT zb;?`;dmp?3{Z6dApXUea8wS9JBl4@I2%03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"label":"MMS cluster service for amd64", + "description":"Cluster Service Test k8s-hello-mms", + "public":true, + "sharable":"multiple", + "url":"k8s-hello-mms", + "version":"$VERS", + "arch":"${ARCH}", + "requiredServices":[ + ], + "userInput": [ + { + "name": "LISTEN_PORT", + "value": "8347" + }, + { + "name": "MMS_OBJECT_TYPES", + "value": ["model", "model1", "model2"] + }, + { + "name": "SERVICE_TO_START", + "value": "openhorizon/hello-k8s-mms-consumer_amd64:2.0.0" + }, + { + "name": "MMS_HELPER_SERVICE_TO_START", + "value": "openhorizon/hello-k8s-mms-helper_amd64:2.0.0" + } + ], + "clusterDeployment": { + "operatorYamlArchive": "/root/input_files/k8s_deploy/k8s-mms-operator/k8s-mms-operator.tar.gz" + }, + "clusterDeploymentSignature": "" +} +EOF + +echo -e "Register k8s-hello-mms $VERS:" +hzn exchange service publish -I -u $E2EDEV_ADMIN_AUTH -o e2edev@somecomp.com -f $KEY_TEST_DIR/svc_k8s_mms.json -k $KEY_TEST_DIR/*private.key -K $KEY_TEST_DIR/*public.pem +if [ $? -ne 0 ] +then + echo -e "hzn exchange service publish failed for k8s-hello-mms." + exit 2 +fi + echo -e "Listing services:" hzn exchange service list -o e2edev@somecomp.com @@ -1609,6 +1653,48 @@ echo -e "Register business policy bp_k8s_secret for k8s-hello-secret:" results "$RES" fi +read -d '' bpk8smmsdef <