Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tests/templates/kuttl/external-access/50-assert.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ commands:
# 8793 port for the Webserver: we don't use the token as that is an
# internal implementation, but check that the endpoint is reachable,
# indicated by a 403.
# N.B. this behaviour is stricter in 3.1.0, whereby the "/log" suffix
# has to be declared.
# See https://github.com/apache/airflow/pull/52581.
CURL_RESPONSE=$(
kubectl -n $NAMESPACE exec airflow-webserver-default-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-default-headless:8793 2>/dev/null || true);echo "$CODE"'
kubectl -n $NAMESPACE exec airflow-webserver-default-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-default-headless:8793/log 2>/dev/null || true);echo "$CODE"'
)

# Log-Endpoint Test Assertion:
Expand Down
5 changes: 4 additions & 1 deletion tests/templates/kuttl/ldap/95-assert.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ commands:
# 8793 port for the Webserver: we don't use the token as that is an
# internal implementation, but check that the endpoint is reachable,
# indicated by a 403.
# N.B. this behaviour is stricter in 3.1.0, whereby the "/log" suffix
# has to be declared.
# See https://github.com/apache/airflow/pull/52581.
CURL_RESPONSE=$(
kubectl -n $NAMESPACE exec airflow-webserver-default-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-default-headless:8793 2>/dev/null || true);echo "$CODE"'
kubectl -n $NAMESPACE exec airflow-webserver-default-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-default-headless:8793/log 2>/dev/null || true);echo "$CODE"'
)

# Log-Endpoint Test Assertion:
Expand Down
8 changes: 6 additions & 2 deletions tests/templates/kuttl/logging/70-assert.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,21 @@ commands:
# 8793 port for the Webserver: we don't use the token as that is an
# internal implementation, but check that the endpoint is reachable,
# indicated by a 403.
# N.B. this behaviour is stricter in 3.1.0, whereby the "/log" suffix
# has to be declared.
# See https://github.com/apache/airflow/pull/52581.

# Rolegroup custom-log-config
CURL_RESPONSE_CUSTOM=$(
kubectl -n $NAMESPACE exec airflow-webserver-custom-log-config-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-custom-log-config-headless:8793 2>/dev/null || true);echo "$CODE"'
kubectl -n $NAMESPACE exec airflow-webserver-custom-log-config-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-custom-log-config-headless:8793/log 2>/dev/null || true);echo "$CODE"'
)

# Log-Endpoint Test Assertions:
echo "The HTTP Code is $CURL_RESPONSE_CUSTOM (an internal JWT token is needed for full access)"

# Rolegroup automatic-log-config
CURL_RESPONSE_AUTO=$(
kubectl -n $NAMESPACE exec airflow-webserver-automatic-log-config-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-automatic-log-config-headless:8793 2>/dev/null || true);echo "$CODE"'
kubectl -n $NAMESPACE exec airflow-webserver-automatic-log-config-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-automatic-log-config-headless:8793/log 2>/dev/null || true);echo "$CODE"'
)
echo "The HTTP Code is $CURL_RESPONSE_AUTO (an internal JWT token is needed for full access)"
[ "$CURL_RESPONSE_CUSTOM" -eq 403 ] && [ "$CURL_RESPONSE_AUTO" -eq 403 ]
Expand Down
5 changes: 4 additions & 1 deletion tests/templates/kuttl/mount-dags-configmap/70-assert.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ commands:
# 8793 port for the Webserver: we don't use the token as that is an
# internal implementation, but check that the endpoint is reachable,
# indicated by a 403.
# N.B. this behaviour is stricter in 3.1.0, whereby the "/log" suffix
# has to be declared.
# See https://github.com/apache/airflow/pull/52581.
CURL_RESPONSE=$(
kubectl -n $NAMESPACE exec airflow-webserver-default-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-default-headless:8793 2>/dev/null || true);echo "$CODE"'
kubectl -n $NAMESPACE exec airflow-webserver-default-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-default-headless:8793/log 2>/dev/null || true);echo "$CODE"'
)

# Log-Endpoint Test Assertion:
Expand Down
5 changes: 4 additions & 1 deletion tests/templates/kuttl/mount-dags-gitsync/70-assert.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ commands:
# 8793 port for the Webserver: we don't use the token as that is an
# internal implementation, but check that the endpoint is reachable,
# indicated by a 403.
# N.B. this behaviour is stricter in 3.1.0, whereby the "/log" suffix
# has to be declared.
# See https://github.com/apache/airflow/pull/52581.
CURL_RESPONSE=$(
kubectl -n $NAMESPACE exec airflow-webserver-default-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-default-headless:8793 2>/dev/null || true);echo "$CODE"'
kubectl -n $NAMESPACE exec airflow-webserver-default-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-default-headless:8793/log 2>/dev/null || true);echo "$CODE"'
)

# Log-Endpoint Test Assertion:
Expand Down
5 changes: 4 additions & 1 deletion tests/templates/kuttl/smoke/80-assert.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ commands:
# 8793 port for the Webserver: we don't use the token as that is an
# internal implementation, but check that the endpoint is reachable,
# indicated by a 403.
# N.B. this behaviour is stricter in 3.1.0, whereby the "/log" suffix
# has to be declared.
# See https://github.com/apache/airflow/pull/52581.
CURL_RESPONSE=$(
kubectl -n $NAMESPACE exec airflow-webserver-default-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-default-headless:8793 2>/dev/null || true);echo "$CODE"'
kubectl -n $NAMESPACE exec airflow-webserver-default-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-default-headless:8793/log 2>/dev/null || true);echo "$CODE"'
)

# Log-Endpoint Test Assertion:
Expand Down
5 changes: 4 additions & 1 deletion tests/templates/kuttl/triggerer/70-assert.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ commands:
# 8793 port for the Webserver: we don't use the token as that is an
# internal implementation, but check that the endpoint is reachable,
# indicated by a 403.
# N.B. this behaviour is stricter in 3.1.0, whereby the "/log" suffix
# has to be declared.
# See https://github.com/apache/airflow/pull/52581.
CURL_RESPONSE=$(
kubectl -n $NAMESPACE exec airflow-webserver-default-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-default-headless:8793 2>/dev/null || true);echo "$CODE"'
kubectl -n $NAMESPACE exec airflow-webserver-default-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-default-headless:8793/log 2>/dev/null || true);echo "$CODE"'
)

# Log-Endpoint Test Assertion:
Expand Down
5 changes: 4 additions & 1 deletion tests/templates/kuttl/versioning/70-assert.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ commands:
# 8793 port for the Webserver: we don't use the token as that is an
# internal implementation, but check that the endpoint is reachable,
# indicated by a 403.
# N.B. this behaviour is stricter in 3.1.0, whereby the "/log" suffix
# has to be declared.
# See https://github.com/apache/airflow/pull/52581.
CURL_RESPONSE=$(
kubectl -n $NAMESPACE exec airflow-webserver-default-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-default-headless:8793 2>/dev/null || true);echo "$CODE"'
kubectl -n $NAMESPACE exec airflow-webserver-default-0 -- sh -c 'CODE=$(curl -s -o /dev/null -w "%{http_code}" http://airflow-worker-default-headless:8793/log 2>/dev/null || true);echo "$CODE"'
)

# Log-Endpoint Test Assertion:
Expand Down