The port number and error message we were looking for both seem to have been changed since this test last worked - I tested this against an environment with zero-trust enabled and disabled to make sure the test worked correctly:
(Environment with zero-trust enabled is ztrust, the default disabled zero trust is example-environment)
~/code/architect/architect-cli (reenable-network-policy-test*) » architect-dev exec -a test-tyler -e ztrust superset.services.stateful-api -- sh -c "curl --connect-timeout 10 --insecure -L -I http://hello-world--api:8080/ || true" > network_policy_test.txt 2>&1 </dev/null
if [[ $(cat network_policy_test.txt) == *"Timeout was reached"* ]]; then echo "good"; else echo "bad"; fi
good
--------------------------------------------------------------------------------------------------------------------------------------
~/code/architect/architect-cli (reenable-network-policy-test*) » architect-dev exec -a test-tyler -e example-environment superset.services.stateful-api -- sh -c "curl --connect-timeout 10 --insecure -L -I http://hello-world--api:8080/ || true" > network_policy_test.txt 2>&1 </dev/null
if [[ $(cat network_policy_test.txt) == *"Timeout was reached"* ]]; then echo "good"; else echo "bad"; fi
bad
Re-enabling the network policy test now that we can create an env from the command line with zero-trust enabled: https://gitlab.com/architect-io/architect-cli/-/issues/583
The port number and error message we were looking for both seem to have been changed since this test last worked - I tested this against an environment with zero-trust enabled and disabled to make sure the test worked correctly:
(Environment with zero-trust enabled is
ztrust
, the default disabled zero trust isexample-environment
)