From 563a33952fbfd486ad01c148358bccdd0cbd7f06 Mon Sep 17 00:00:00 2001 From: Rahul Sharma Date: Fri, 3 Jan 2025 19:52:50 +0000 Subject: [PATCH] fix random failures due to curl error --- e2e/test/fw-use-specified-nb/chainsaw-test.yaml | 2 +- e2e/test/lb-http-body-health-check/chainsaw-test.yaml | 2 +- e2e/test/lb-http-status-health-check/chainsaw-test.yaml | 2 +- e2e/test/lb-passive-health-check/chainsaw-test.yaml | 2 +- .../lb-tcp-connection-health-check/chainsaw-test.yaml | 2 +- e2e/test/lb-with-http-to-https/chainsaw-test.yaml | 4 ++-- .../lb-with-multiple-http-https-ports/chainsaw-test.yaml | 8 ++++---- e2e/test/lb-with-node-addition/chainsaw-test.yaml | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/e2e/test/fw-use-specified-nb/chainsaw-test.yaml b/e2e/test/fw-use-specified-nb/chainsaw-test.yaml index 2cbd659a..fb0a0148 100644 --- a/e2e/test/fw-use-specified-nb/chainsaw-test.yaml +++ b/e2e/test/fw-use-specified-nb/chainsaw-test.yaml @@ -103,7 +103,7 @@ spec: fwconfig=$(curl -s \ -H "Authorization: Bearer $LINODE_TOKEN" \ -H "Content-Type: application/json" \ - "https://api.linode.com/v4/networking/firewalls/$fwid") + "https://api.linode.com/v4/networking/firewalls/$fwid" || true) fw_attached_to_nb=$(echo $fwconfig | jq ".entities[] | select(.id == $nbid) | .id == $nbid") diff --git a/e2e/test/lb-http-body-health-check/chainsaw-test.yaml b/e2e/test/lb-http-body-health-check/chainsaw-test.yaml index 16a2ed30..b6246b55 100644 --- a/e2e/test/lb-http-body-health-check/chainsaw-test.yaml +++ b/e2e/test/lb-http-body-health-check/chainsaw-test.yaml @@ -43,7 +43,7 @@ spec: nbconfig=$(curl -s \ -H "Authorization: Bearer $LINODE_TOKEN" \ -H "Content-Type: application/json" \ - "https://api.linode.com/v4/nodebalancers/$nbid/configs" | jq '.data[] | select(.port == 80)') + "https://api.linode.com/v4/nodebalancers/$nbid/configs" | jq '.data[] | select(.port == 80)' || true) if [[ -z $nbconfig ]]; then echo "Failed fetching nodebalancer config for port 80" diff --git a/e2e/test/lb-http-status-health-check/chainsaw-test.yaml b/e2e/test/lb-http-status-health-check/chainsaw-test.yaml index fbe259e7..16f5b728 100644 --- a/e2e/test/lb-http-status-health-check/chainsaw-test.yaml +++ b/e2e/test/lb-http-status-health-check/chainsaw-test.yaml @@ -43,7 +43,7 @@ spec: nbconfig=$(curl -s \ -H "Authorization: Bearer $LINODE_TOKEN" \ -H "Content-Type: application/json" \ - "https://api.linode.com/v4/nodebalancers/$nbid/configs" | jq '.data[] | select(.port == 80)') + "https://api.linode.com/v4/nodebalancers/$nbid/configs" | jq '.data[] | select(.port == 80)' || true) if [[ -z $nbconfig ]]; then echo "Failed fetching nodebalancer config for port 80" diff --git a/e2e/test/lb-passive-health-check/chainsaw-test.yaml b/e2e/test/lb-passive-health-check/chainsaw-test.yaml index 1d2ed8e9..d7479d88 100644 --- a/e2e/test/lb-passive-health-check/chainsaw-test.yaml +++ b/e2e/test/lb-passive-health-check/chainsaw-test.yaml @@ -43,7 +43,7 @@ spec: nbconfig=$(curl -s \ -H "Authorization: Bearer $LINODE_TOKEN" \ -H "Content-Type: application/json" \ - "https://api.linode.com/v4/nodebalancers/$nbid/configs" | jq '.data[] | select(.port == 80)') + "https://api.linode.com/v4/nodebalancers/$nbid/configs" | jq '.data[] | select(.port == 80)' || true) if [[ -z $nbconfig ]]; then echo "Failed fetching nodebalancer config for port 80" diff --git a/e2e/test/lb-tcp-connection-health-check/chainsaw-test.yaml b/e2e/test/lb-tcp-connection-health-check/chainsaw-test.yaml index b6d79a43..f59f14e2 100644 --- a/e2e/test/lb-tcp-connection-health-check/chainsaw-test.yaml +++ b/e2e/test/lb-tcp-connection-health-check/chainsaw-test.yaml @@ -43,7 +43,7 @@ spec: nbconfig=$(curl -s \ -H "Authorization: Bearer $LINODE_TOKEN" \ -H "Content-Type: application/json" \ - "https://api.linode.com/v4/nodebalancers/$nbid/configs" | jq '.data[] | select(.port == 80)') + "https://api.linode.com/v4/nodebalancers/$nbid/configs" | jq '.data[] | select(.port == 80)' || true) if [[ -z $nbconfig ]]; then echo "Failed fetching nodebalancer config for port 80" diff --git a/e2e/test/lb-with-http-to-https/chainsaw-test.yaml b/e2e/test/lb-with-http-to-https/chainsaw-test.yaml index cca2b4d9..745b77ad 100644 --- a/e2e/test/lb-with-http-to-https/chainsaw-test.yaml +++ b/e2e/test/lb-with-http-to-https/chainsaw-test.yaml @@ -75,8 +75,8 @@ spec: IP=$(kubectl get svc svc-test -n $NAMESPACE -o json | jq -r .status.loadBalancer.ingress[0].ip) for i in {1..10}; do - port_80=$(curl -s $IP:80 | grep "test-") - port_443=$(curl --resolve linode.test:443:$IP --cacert ../certificates/ca.crt -s https://linode.test:443 | grep "test-") + port_80=$(curl -s $IP:80 | grep "test-" || true) + port_443=$(curl --resolve linode.test:443:$IP --cacert ../certificates/ca.crt -s https://linode.test:443 | grep "test-" || true) if [[ -z $port_80 || -z $port_443 ]]; then sleep 20 diff --git a/e2e/test/lb-with-multiple-http-https-ports/chainsaw-test.yaml b/e2e/test/lb-with-multiple-http-https-ports/chainsaw-test.yaml index 587fbb7a..da73d113 100644 --- a/e2e/test/lb-with-multiple-http-https-ports/chainsaw-test.yaml +++ b/e2e/test/lb-with-multiple-http-https-ports/chainsaw-test.yaml @@ -67,10 +67,10 @@ spec: IP=$(kubectl get svc svc-test -n $NAMESPACE -o json | jq -r .status.loadBalancer.ingress[0].ip) for i in {1..10}; do - port_80=$(curl -s $IP:80 | grep "test-") - port_8080=$(curl -s $IP:8080 | grep "test-") - port_443=$(curl --resolve linode.test:443:$IP --cacert ../certificates/ca.crt -s https://linode.test:443 | grep "test-") - port_8443=$(curl --resolve linode.test:8443:$IP --cacert ../certificates/ca.crt -s https://linode.test:8443 | grep "test-") + port_80=$(curl -s $IP:80 | grep "test-" || true) + port_8080=$(curl -s $IP:8080 | grep "test-" || true) + port_443=$(curl --resolve linode.test:443:$IP --cacert ../certificates/ca.crt -s https://linode.test:443 | grep "test-" || true) + port_8443=$(curl --resolve linode.test:8443:$IP --cacert ../certificates/ca.crt -s https://linode.test:8443 | grep "test-" || true) if [[ -z $port_80 || -z $port_8080 || -z $port_443 || -z $port_8443 ]]; then sleep 15 diff --git a/e2e/test/lb-with-node-addition/chainsaw-test.yaml b/e2e/test/lb-with-node-addition/chainsaw-test.yaml index 52f136b4..62f17873 100644 --- a/e2e/test/lb-with-node-addition/chainsaw-test.yaml +++ b/e2e/test/lb-with-node-addition/chainsaw-test.yaml @@ -78,7 +78,7 @@ spec: nbconfig=$(curl -s \ -H "Authorization: Bearer $LINODE_TOKEN" \ -H "Content-Type: application/json" \ - "https://api.linode.com/v4/nodebalancers/$nbid/configs" | jq '.data[]? | select(.port == 80)') + "https://api.linode.com/v4/nodebalancers/$nbid/configs" | jq '.data[]? | select(.port == 80)' || true) if [[ -z $nbconfig ]]; then echo "Failed fetching nodebalancer config for port 80"