Skip to content

Commit

Permalink
Merge pull request #537 from averevki/dns-config-skip
Browse files Browse the repository at this point in the history
Skip geo test if dns not configured
  • Loading branch information
averevki authored Sep 17, 2024
2 parents b52a86c + c27efe5 commit 652abec
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions testsuite/tests/multicluster/load_balanced/conftest.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
"""Conftest for load-balanced multicluster tests"""

import pytest
from dynaconf import ValidationError

from testsuite.kuadrant.policy.dns import DNSPolicy, LoadBalancing


@pytest.fixture(scope="package")
def dns_config(testconfig):
def dns_config(testconfig, skip_or_fail):
"""Configuration for DNS tests"""
testconfig.validators.validate(only="dns")
return testconfig["dns"]
try:
testconfig.validators.validate(only="dns")
return testconfig["dns"]
except ValidationError as exc:
return skip_or_fail(f"DNS configuration is missing: {exc}")


@pytest.fixture(scope="package")
Expand Down

0 comments on commit 652abec

Please sign in to comment.