Skip to content

Commit b86e9aa

Browse files
committed
Enable notification tests again.
1 parent 81daf90 commit b86e9aa

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,12 @@ jobs:
107107
export RELEASE_NAME="${RELEASE_NAME}"
108108
export PGO_VERSION="${{ env.PGO_VERSION }}"
109109
110-
# Deploy using consolidated script with ingress enabled for testing (Traefik in K3s)
110+
# Deploy using consolidated script with k3s values for testing
111111
./scripts/deploy.sh deploy --namespace "${RELEASE_NAME}" --release "${RELEASE_NAME}" \
112-
--set ingress.className=traefik \
112+
-f charts/eoapi/local-base-values.yaml \
113+
-f charts/eoapi/local-k3s-values.yaml \
113114
--set ingress.host=eoapi.local \
115+
--set eoapi-notifier.config.sources[0].config.connection.existingSecret.name="${RELEASE_NAME}-pguser-eoapi" \
114116
--debug
115117
116118
- name: Debug session after deployment

.github/workflows/tests/test_notifications.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Test notification system deployment and functionality."""
22

33
import json
4+
import os
45
import subprocess
56
import time
67

@@ -9,6 +10,9 @@
910

1011
def test_eoapi_notifier_deployment():
1112
"""Test that eoapi-notifier deployment is running."""
13+
# Get namespace from environment variable
14+
namespace = os.environ.get("NAMESPACE", "eoapi")
15+
1216
# Check if eoapi-notifier deployment exists and is ready
1317
result = subprocess.run(
1418
[
@@ -18,7 +22,7 @@ def test_eoapi_notifier_deployment():
1822
"-l",
1923
"app.kubernetes.io/name=eoapi-notifier",
2024
"-n",
21-
"eoapi",
25+
namespace,
2226
"--no-headers",
2327
"-o",
2428
"custom-columns=READY:.status.readyReplicas",
@@ -40,6 +44,9 @@ def test_eoapi_notifier_deployment():
4044

4145
def test_cloudevents_sink_exists():
4246
"""Test that Knative CloudEvents sink service exists and is accessible."""
47+
# Get namespace from environment variable
48+
namespace = os.environ.get("NAMESPACE", "eoapi")
49+
4350
# Check if Knative service exists
4451
result = subprocess.run(
4552
[
@@ -48,6 +55,8 @@ def test_cloudevents_sink_exists():
4855
"ksvc",
4956
"-l",
5057
"app.kubernetes.io/component=cloudevents-sink",
58+
"-n",
59+
namespace,
5160
"--no-headers",
5261
],
5362
capture_output=True,
@@ -66,6 +75,9 @@ def test_cloudevents_sink_exists():
6675

6776
def test_notification_configuration():
6877
"""Test that eoapi-notifier is configured correctly."""
78+
# Get namespace from environment variable
79+
namespace = os.environ.get("NAMESPACE", "eoapi")
80+
6981
# Get the configmap for eoapi-notifier
7082
result = subprocess.run(
7183
[
@@ -74,6 +86,8 @@ def test_notification_configuration():
7486
"configmap",
7587
"-l",
7688
"app.kubernetes.io/name=eoapi-notifier",
89+
"-n",
90+
namespace,
7791
"-o",
7892
r"jsonpath={.items[0].data.config\.yaml}",
7993
],
@@ -96,6 +110,9 @@ def test_notification_configuration():
96110

97111
def test_cloudevents_sink_logs_show_startup():
98112
"""Test that Knative CloudEvents sink started successfully."""
113+
# Get namespace from environment variable
114+
namespace = os.environ.get("NAMESPACE", "eoapi")
115+
99116
# Get Knative CloudEvents sink pod logs
100117
result = subprocess.run(
101118
[
@@ -104,7 +121,7 @@ def test_cloudevents_sink_logs_show_startup():
104121
"-l",
105122
"serving.knative.dev/service",
106123
"-n",
107-
"eoapi",
124+
namespace,
108125
"--tail=20",
109126
],
110127
capture_output=True,

0 commit comments

Comments
 (0)