From 82c6206a9993054619c3c67e38b7a678149b28b6 Mon Sep 17 00:00:00 2001 From: Weii Wang Date: Fri, 3 Jul 2026 19:41:05 +0800 Subject: [PATCH 1/4] fix integration test --- tests/test_charms.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/tests/test_charms.py b/tests/test_charms.py index 96ae88fe..e0ec483c 100644 --- a/tests/test_charms.py +++ b/tests/test_charms.py @@ -200,8 +200,25 @@ async def test_active( }, ) - # Waiting for 2mn as this is the maximum time for bind's config to update and propagate - time.sleep(120) + juju.wait( + lambda status: ( + jubilant.all_active( + status, + bind_name, + dns_resolver_name, + dns_secondary_name, + ) + and jubilant.all_agents_idle( + status, + bind_name, + dns_resolver_name, + dns_secondary_name, + dns_integrator_name, + ) + ), + error=jubilant.any_error, + successes=10, + ) # Check that bind and dns-resolver respond correctly for ip in [bind_ip, dns_resolver_ip, dns_secondary_ip]: From c1c3e796d816f9b39b9687556a9f5f60d31e55be Mon Sep 17 00:00:00 2001 From: Weii Wang Date: Fri, 3 Jul 2026 19:49:27 +0800 Subject: [PATCH 2/4] fix integration test --- .github/workflows/integration-test-global.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/integration-test-global.yaml b/.github/workflows/integration-test-global.yaml index f8823795..825abe5d 100644 --- a/.github/workflows/integration-test-global.yaml +++ b/.github/workflows/integration-test-global.yaml @@ -3,6 +3,7 @@ name: Global integration tests on: pull_request: paths: + - 'tests/**' - 'bind-operator/src/**' - 'bind-operator/tests/**' - 'bind-operator/requirements.txt' @@ -15,6 +16,10 @@ on: - 'dns-integrator-operator/tests/**' - 'dns-integrator-operator/requirements.txt' - 'dns-integrator-operator/charmcraft.yaml' + - 'dns-secondary-operator/src/**' + - 'dns-secondary-operator/tests/**' + - 'dns-secondary-operator/requirements.txt' + - 'dns-secondary-operator/charmcraft.yaml' - '.github/workflows/integration-test-global.yaml' push: branches: From e9c1f4955e31bfe73b60da081b335e886cc5229a Mon Sep 17 00:00:00 2001 From: Weii Wang Date: Sat, 4 Jul 2026 00:08:42 +0800 Subject: [PATCH 3/4] fix integration test --- .github/workflows/integration-test-global.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-test-global.yaml b/.github/workflows/integration-test-global.yaml index 825abe5d..a21a292e 100644 --- a/.github/workflows/integration-test-global.yaml +++ b/.github/workflows/integration-test-global.yaml @@ -28,7 +28,7 @@ on: jobs: integration-test: name: Integration tests - timeout-minutes: 60 + timeout-minutes: 120 runs-on: ubuntu-24.04 steps: - name: Disable snap autorefresh From c54c0c2d0fd54eb398e43bb4b3c931fa998df227 Mon Sep 17 00:00:00 2001 From: Weii Wang Date: Sat, 4 Jul 2026 01:15:27 +0800 Subject: [PATCH 4/4] fix integration test --- dns-resolver-operator/src/bind.py | 2 +- dns-secondary-operator/src/bind.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dns-resolver-operator/src/bind.py b/dns-resolver-operator/src/bind.py index 52f54e61..fb54acc1 100644 --- a/dns-resolver-operator/src/bind.py +++ b/dns-resolver-operator/src/bind.py @@ -196,7 +196,7 @@ def _generate_named_conf_options(self) -> str: """ content: str = "" content += templates.NAMED_CONF_OPTIONS_TEMPLATE.format( - allow_query="0.0.0.0/0", + allow_query="any", ) return content diff --git a/dns-secondary-operator/src/bind.py b/dns-secondary-operator/src/bind.py index 1f24258c..519ba6bb 100644 --- a/dns-secondary-operator/src/bind.py +++ b/dns-secondary-operator/src/bind.py @@ -55,7 +55,7 @@ def write_config_options(self, enable_tls: bool = False) -> None: Args: enable_tls: enable TLS configuration. Defaults to False. """ - allow_query = "0.0.0.0/0" + allow_query = "any" content: str = "" options = templates.NAMED_CONF_OPTIONS_TEMPLATE.format(allow_query=allow_query) if enable_tls: