Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check pod status before getting logs #5165

Merged
merged 2 commits into from
Feb 26, 2024
Merged
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
9 changes: 8 additions & 1 deletion tests/suite/test_virtual_server_externaldns.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
from settings import TEST_DATA
from suite.utils.custom_assertions import assert_event, assert_event_not_present
from suite.utils.custom_resources_utils import is_dnsendpoint_present, read_custom_resource
from suite.utils.resources_utils import get_events, patch_namespace_with_label, wait_before_test
from suite.utils.resources_utils import (
get_events,
patch_namespace_with_label,
wait_before_test,
wait_until_all_pods_are_ready,
)
from suite.utils.vs_vsr_resources_utils import patch_virtual_server_from_yaml
from suite.utils.yaml_utils import get_name_from_yaml, get_namespace_from_yaml

Expand Down Expand Up @@ -39,6 +44,7 @@ def test_responses_after_setup(
assert dep is True
print("\nStep 2: Verify external-dns picked up the record")
pod_ns = get_namespace_from_yaml(f"{TEST_DATA}/virtual-server-external-dns/external-dns.yaml")
wait_until_all_pods_are_ready(kube_apis.v1, pod_ns)
pod_name = kube_apis.v1.list_namespaced_pod(pod_ns).items[0].metadata.name
log_contents = kube_apis.v1.read_namespaced_pod_log(pod_name, pod_ns)
wanted_string = "CREATE: virtual-server.example.com 0 IN A"
Expand Down Expand Up @@ -140,6 +146,7 @@ def test_responses_after_setup(
assert dep is True
print("\nStep 2: Verify external-dns picked up the record")
pod_ns = get_namespace_from_yaml(f"{TEST_DATA}/virtual-server-external-dns/external-dns.yaml")
wait_until_all_pods_are_ready(kube_apis.v1, pod_ns)
pod_name = kube_apis.v1.list_namespaced_pod(pod_ns).items[0].metadata.name
log_contents = kube_apis.v1.read_namespaced_pod_log(pod_name, pod_ns)
wanted_string = "CREATE: virtual-server.example.com 0 IN A"
Expand Down
Loading