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.
main
wizardchen 2026-08-27 11:00:44 +08:00 committed by lyingbug
parent 270b64f6ec
commit 6cc7a9e15b
2 changed files with 3 additions and 3 deletions

View File

@ -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,

View File

@ -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"])
}