Skip to content

Commit

Permalink
add global config event check to test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Ryan committed Sep 11, 2024
1 parent 4ba580a commit d8877a5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/suite/test_transport_server_custom_ip_listener.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
from settings import TEST_DATA
from suite.utils.custom_resources_utils import patch_gc_from_yaml, patch_ts_from_yaml
from suite.utils.resources_utils import get_ts_nginx_template_conf, wait_before_test
from suite.utils.resources_utils import get_events_for_object, get_ts_nginx_template_conf, wait_before_test


@pytest.mark.ts
Expand Down Expand Up @@ -53,3 +53,13 @@ def test_ts_custom_ip_listener(
conf_lines = [line.strip() for line in conf.split("\n")]
assert "listen 127.0.0.1:5353;" in conf_lines
assert "listen [::1]:5353;" in conf_lines

gc_events = get_events_for_object(kube_apis.v1, "nginx-ingress", "nginx-configuration")
gc_event_latest = gc_events[-1]
print(gc_event_latest)

assert (
gc_event_latest.reason == "Updated"
and gc_event_latest.type == "Normal"
and "GlobalConfiguration nginx-ingress/nginx-configuration was added or updated" in gc_event_latest.message
)

0 comments on commit d8877a5

Please sign in to comment.