aboutsummaryrefslogtreecommitdiffstats
path: root/kud/tests/plugin_edgex.sh
diff options
context:
space:
mode:
authorr.kuralamudhan <kuralamudhan.ramakrishnan@intel.com>2019-11-19 23:05:47 -0800
committerr.kuralamudhan <kuralamudhan.ramakrishnan@intel.com>2019-11-20 06:41:11 -0800
commitd405884a52745df2b09f777a62c2facd7651885f (patch)
tree3d41b67e900dfd01bdaf801945ccd1475a5f3281 /kud/tests/plugin_edgex.sh
parentf168ebb73d8dad0e1c75747cbc9b0a0de8fc2357 (diff)
Enabling testing for the containerized installer
Issue-ID: MULTICLOUD-942 Signed-off-by: r.kuralamudhan <kuralamudhan.ramakrishnan@intel.com> Change-Id: I4c5da84002135d856c5c3dcccf103aa52bb8a0f9
Diffstat (limited to 'kud/tests/plugin_edgex.sh')
-rwxr-xr-xkud/tests/plugin_edgex.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/kud/tests/plugin_edgex.sh b/kud/tests/plugin_edgex.sh
index 8eae5692..ae390add 100755
--- a/kud/tests/plugin_edgex.sh
+++ b/kud/tests/plugin_edgex.sh
@@ -17,7 +17,16 @@ source _common_test.sh
source _functions.sh
source _common.sh
-base_url="http://localhost:9015/v1"
+if [ ${1:+1} ]; then
+ if [ "$1" == "--external" ]; then
+ master_ip=$(kubectl cluster-info | grep "Kubernetes master" | \
+ awk -F ":" '{print $2}' | awk -F "//" '{print $2}')
+ onap_svc_node_port=30498
+ base_url="http://$master_ip:$onap_svc_node_port/v1"
+ fi
+fi
+
+base_url=${base_url:-"http://localhost:9015/v1"}
kubeconfig_path="$HOME/.kube/config"
csar_id=cb009bfe-bbee-11e8-9766-525400435678
rb_name="edgex"
@@ -91,6 +100,9 @@ response="$(call_api -d "${payload}" "${base_url}/instance")"
echo "$response"
vnf_id="$(jq -r '.id' <<< "${response}")"
+print_msg "Waiting for EdgeX instances"
+sleep 240
+
print_msg "Validating Kubernetes"
kubectl get --no-headers=true --namespace=${namespace} deployment edgex-core-command
kubectl get --no-headers=true --namespace=${namespace} service edgex-core-command