Skip to content

Commit

Permalink
ci/tests: remove -t from kubectl commands in scripts (operator-fram…
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNPavel authored Aug 27, 2019
1 parent 8e55eb7 commit 8a115ce
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
22 changes: 15 additions & 7 deletions ci/tests/e2e-ansible.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,29 @@ test_operator() {
if ! timeout 20s bash -c -- "until kubectl get service/memcached-operator-metrics > /dev/null 2>&1; do sleep 1; done";
then
echo "Failed to get metrics service"
kubectl logs deployment/memcached-operator
kubectl describe pods
kubectl logs deployment/memcached-operator -c operator
kubectl logs deployment/memcached-operator -c ansible
exit 1
fi

# verify that the metrics endpoint exists
if ! timeout 1m bash -c -- "until kubectl run -it --rm --restart=Never test-metrics --image=registry.access.redhat.com/ubi7/ubi-minimal:latest -- curl -sfo /dev/null http://memcached-operator-metrics:8383/metrics; do sleep 1; done";
if ! timeout 1m bash -c -- "until kubectl run -i --rm --restart=Never test-metrics --image=registry.access.redhat.com/ubi7/ubi-minimal:latest -- curl -sfo /dev/null http://memcached-operator-metrics:8383/metrics; do sleep 1; done";
then
echo "Failed to verify that metrics endpoint exists"
kubectl logs deployment/memcached-operator
kubectl describe pods
kubectl logs deployment/memcached-operator -c operator
kubectl logs deployment/memcached-operator -c ansible
exit 1
fi

# verify that the operator metrics endpoint exists
if ! timeout 1m bash -c -- "until kubectl run -it --rm --restart=Never test-metrics --image=registry.access.redhat.com/ubi7/ubi-minimal:latest -- curl -sfo /dev/null http://memcached-operator-metrics:8686/metrics; do sleep 1; done";
if ! timeout 1m bash -c -- "until kubectl run -i --rm --restart=Never test-metrics --image=registry.access.redhat.com/ubi7/ubi-minimal:latest -- curl -sfo /dev/null http://memcached-operator-metrics:8686/metrics; do sleep 1; done";
then
echo "Failed to verify that metrics endpoint exists"
kubectl logs deployment/memcached-operator
kubectl describe pods
kubectl logs deployment/memcached-operator -c operator
kubectl logs deployment/memcached-operator -c ansible
exit 1
fi

Expand All @@ -96,10 +102,12 @@ test_operator() {
fi

# verify that metrics reflect cr creation
if ! bash -c -- 'kubectl run -it --rm --restart=Never test-metrics --image=registry.access.redhat.com/ubi7/ubi-minimal:latest -- curl http://memcached-operator-metrics:8686/metrics | grep example-memcached';
if ! bash -c -- 'kubectl run -i --rm --restart=Never test-metrics --image=registry.access.redhat.com/ubi7/ubi-minimal:latest -- curl http://memcached-operator-metrics:8686/metrics | grep example-memcached';
then
echo "Failed to verify custom resource metrics"
kubectl logs deployment/memcached-operator
kubectl describe pods
kubectl logs deployment/memcached-operator -c operator
kubectl logs deployment/memcached-operator -c ansible
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion ci/tests/e2e-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ test_operator() {
fi

# verify that the metrics endpoint exists
if ! timeout 1m bash -c -- "until kubectl run -it --rm --restart=Never test-metrics --image=registry.access.redhat.com/ubi7/ubi-minimal:latest -- curl -sfo /dev/null http://nginx-operator-metrics:8383/metrics; do sleep 1; done";
if ! timeout 1m bash -c -- "until kubectl run -i --rm --restart=Never test-metrics --image=registry.access.redhat.com/ubi7/ubi-minimal:latest -- curl -sfo /dev/null http://nginx-operator-metrics:8383/metrics; do sleep 1; done";
then
echo "Failed to verify that metrics endpoint exists"
kubectl logs deployment/nginx-operator
Expand Down

0 comments on commit 8a115ce

Please sign in to comment.