diff options
author | Konrad Bańka <k.banka@samsung.com> | 2020-08-18 15:51:38 +0200 |
---|---|---|
committer | Ritu Sood <Ritu.Sood@intel.com> | 2020-08-21 14:17:29 +0000 |
commit | a6e596eeef741026704c123eed614f5a0a370fda (patch) | |
tree | d775e49b4805731b8d3cbd69cf318e32cdffce6b | |
parent | e3e6c103f6e1cd1431ddacd23d500f39fbd1bcee (diff) |
Expose override parameters usage in KUD API tests
Update plugin_fw.sh test script to also check for proper work of
override parameters functionality of instance API.
Also update instance API response to exclude duplicated
override-parameters entry, that's anyway accessible under
'.request.override-values' json path.
Issue-ID: MULTICLOUD-1176
Signed-off-by: Konrad Bańka <k.banka@samsung.com>
Change-Id: Ie1a336ceb7de1a656f77d4c43ee4775c60cb88fb
-rwxr-xr-x | kud/tests/plugin_fw.sh | 23 | ||||
-rw-r--r-- | src/k8splugin/internal/app/instance.go | 1 |
2 files changed, 15 insertions, 9 deletions
diff --git a/kud/tests/plugin_fw.sh b/kud/tests/plugin_fw.sh index eec467c3..9c981773 100755 --- a/kud/tests/plugin_fw.sh +++ b/kud/tests/plugin_fw.sh @@ -92,7 +92,9 @@ payload="$(cat <<EOF "rb-name": "${rb_name}", "rb-version": "${rb_version}", "profile-name": "${profile_name}", - "cloud-region": "${cloud_region_id}" + "cloud-region": "${cloud_region_id}", + "labels": {"testCaseName": "plugin_fw.sh"}, + "override-values": {"global.onapPrivateNetworkName": "onap-private-net-test"} } EOF )" @@ -100,19 +102,24 @@ response="$(call_api -d "${payload}" "${base_url}/instance")" echo "$response" vnf_id="$(jq -r '.id' <<< "${response}")" -print_msg "Validating VNF instance" -# Check if all pods are up +print_msg "[BEGIN] Basic checks for instantiated resource" +print_msg "Check if override value has been applied correctly" +kubectl get network -n "${namespace}" onap-private-net-test +print_msg "Wait for all pods to start" wait_for_pod -n "${namespace}" -l app=sink wait_for_pod -n "${namespace}" -l app=firewall wait_for_pod -n "${namespace}" -l app=packetgen # TODO: Provide some health check to verify vFW work - -print_msg "Waiting for VNF instances" -sleep 480 +print_msg "Not waiting for vFW to fully install as no further checks are implemented in testcase" +#print_msg "Waiting 8minutes for vFW installation" +#sleep 8m +print_msg "[END] Basic checks for instantiated resource" print_msg "Retrieving VNF details" -call_api "${base_url}/instance/${vnf_id}" - +response="$(call_api "${base_url}/instance/${vnf_id}")" +echo "$response" +print_msg "Assert additional label has been assigned to rb instance" +test "$(jq -r .request.labels.testCaseName <<< "${response}")" == plugin_fw.sh #Teardown print_msg "Deleting VNF Instance" diff --git a/src/k8splugin/internal/app/instance.go b/src/k8splugin/internal/app/instance.go index d6eb91b4..ad677644 100644 --- a/src/k8splugin/internal/app/instance.go +++ b/src/k8splugin/internal/app/instance.go @@ -46,7 +46,6 @@ type InstanceResponse struct { Request InstanceRequest `json:"request"` Namespace string `json:"namespace"` Resources []helm.KubernetesResource `json:"resources"` - OverrideValues map[string]string `json:"override-values"` } // InstanceMiniResponse contains the response from instantiation |