diff options
author | 2018-01-31 20:51:38 -0800 | |
---|---|---|
committer | 2018-01-31 20:51:38 -0800 | |
commit | c134f84b32e9db07dcf2f596ebbb4a08ea5ce41c (patch) | |
tree | 24b26a3aeba496c68990b61570a970ca116cfda7 | |
parent | 2455319d8aa4e97d6fa0047ae7ffec2399d6045c (diff) |
Update test to use clearwater-live-test
JIRA: MODELS-2
Change-Id: Id5a2110a419245fb605c5177405642fc5ca1d53c
Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
-rw-r--r-- | tests/k8s-cloudify-clearwater.sh | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/tests/k8s-cloudify-clearwater.sh b/tests/k8s-cloudify-clearwater.sh index ce7176e..ad48c5b 100644 --- a/tests/k8s-cloudify-clearwater.sh +++ b/tests/k8s-cloudify-clearwater.sh @@ -125,43 +125,39 @@ EOF function run_test() { ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \ - $k8s_user@$k8s_master <<EOG -cat <<EOF >~/callsip.yaml + $k8s_user@$k8s_master <<'EOG' +cat <<EOF >~/clearwater-live-test.yaml apiVersion: v1 kind: Pod metadata: - name: callsip + name: clearwater-live-test namespace: default spec: containers: - - name: callsip - image: ubuntu + - name: clearwater-live-test + image: blsaws/clearwater-live-test:stable command: - sleep - "3600" imagePullPolicy: IfNotPresent + volumeMounts: + - mountPath: /tmp + name: tmp + volumes: + - name: tmp + hostPath: + path: /tmp restartPolicy: Always EOF -kubectl create -f ~/callsip.yaml -kubectl exec -d --namespace default callsip <<EOF -apt-get update -apt-get install -y git netcat dnsutils jq curl -nslookup bono.default.svc.cluster.local - -curl -o /tmp/json -v -H "NGV-Signup-Code: secret" -H "Content-Type: application/json" -d "{\"email\": \"bob@example.com\", \"password\": \"example\", \"full_name\": \"Bob\"}" -X POST "http://ellis.default.svc.cluster.local:80/accounts" - -curl -o /tmp/json -v -H "NGV-API-Key: secret" -X POST http://ellis.default.svc.cluster.local:80/accounts/bob@example.com/numbers/ - -curl -o /tmp/json -v -H "Content-Type: application/json" -d "{\"email\": \"bob@example.com\", \"password\": \"example\"}" -X POST "http://ellis.default.svc.cluster.local:80/session" - - -curl -H "NGV-API-Key: secret" -H "Content-Type: application/json" -d "{\"private_id\": \"sip:bob@example.com\", \"new_private_id\": \"true\"}" -X POST http://ellis.default.svc.cluster.local:80/accounts/bob@example.com/numbers/sip:1@example.com - -git clone https://github.com/rundekugel/callSip.sh.git -while true ; do - bash /callSip.sh/src/callSip.sh -v 4 -p 5060 -d 10 -s bono.default.svc.cluster.local -c bob@example.com alice@example.com +kubectl create -f ~/clearwater-live-test.yaml +status=$(kubectl get pods -o json --namespace default clearwater-live-test | jq -r '.status.phase') +while [[ "$status" != "Running" ]]; do + echo; echo "clearwater-live-test is $status ... waiting 10 seconds" + sleep 10 + status=$(kubectl get pods -o json --namespace default clearwater-live-test | jq -r '.status.phase') done -EOF +kubectl exec -t --namespace default clearwater-live-test rake test[default.svc.cluster.local] SIGNUP_CODE=secret PROXY=bono.default.svc.cluster.local +kubectl delete pods --namespace default clearwater-live-test EOG } |