From 6cc7a9e15bb1b3d56adce505516815e238caccdd Mon Sep 17 00:00:00 2001 From: wizardchen Date: Thu, 27 Aug 2026 11:00:44 +0800 Subject: [PATCH] test(sandbox): drop TEST-NET DNS fixture from Cube tests Use the same 8.8.8.8 nameserver already used by other Cube DNS tests instead of RFC 5737 documentation addresses. --- internal/application/service/tenant_sandbox_config_test.go | 2 +- internal/sandbox/cube_template_catalog_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/application/service/tenant_sandbox_config_test.go b/internal/application/service/tenant_sandbox_config_test.go index 9bb3d402..60fdb8aa 100644 --- a/internal/application/service/tenant_sandbox_config_test.go +++ b/internal/application/service/tenant_sandbox_config_test.go @@ -118,7 +118,7 @@ func TestSandboxIdentityChanged(t *testing.T) { old: cubeCfg("key-a", "https://cube.example.com", "https://proxy.example.com", "cube.app"), new: func() *types.TenantSandboxConfig { cfg := cubeCfg("key-a", "https://cube.example.com", "https://proxy.example.com", "cube.app") - cfg.Cube.DNSServers = []string{"192.0.2.53"} + cfg.Cube.DNSServers = []string{"8.8.8.8"} return cfg }(), want: false, diff --git a/internal/sandbox/cube_template_catalog_test.go b/internal/sandbox/cube_template_catalog_test.go index b523314a..fd57596f 100644 --- a/internal/sandbox/cube_template_catalog_test.go +++ b/internal/sandbox/cube_template_catalog_test.go @@ -424,7 +424,7 @@ func TestCubeRemoteClientReplaceStandardTemplateRebuildsInPlace(t *testing.T) { http.NotFound(w, r) } }) - client.config.CubeDNSServers = []string{"192.0.2.53"} + client.config.CubeDNSServers = []string{"8.8.8.8"} template, err := client.ReplaceStandardTemplate(context.Background()) require.NoError(t, err) @@ -432,7 +432,7 @@ func TestCubeRemoteClientReplaceStandardTemplateRebuildsInPlace(t *testing.T) { require.Equal(t, "building", template.Status) require.Equal(t, int32(0), deleted.Load(), "in-place rebuild must keep the stored template ID") require.Equal(t, int32(0), created.Load()) - require.Equal(t, []any{"192.0.2.53"}, payload["dns"]) + require.Equal(t, []any{"8.8.8.8"}, payload["dns"]) require.Equal(t, true, payload["allowInternetAccess"]) }