From f65093f1c625dbda8d9ee049c2158b9cd930cd05 Mon Sep 17 00:00:00 2001 From: Mark Anderson Date: Thu, 2 Jun 2022 14:26:41 -0700 Subject: [PATCH] Fixup some more tests Signed-off-by: Mark Anderson --- agent/config/runtime_test.go | 5 ++++- agent/config/testdata/TestRuntimeConfig_Sanitize.golden | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/agent/config/runtime_test.go b/agent/config/runtime_test.go index cdbcb50bc9..9ca6cc5993 100644 --- a/agent/config/runtime_test.go +++ b/agent/config/runtime_test.go @@ -5661,6 +5661,7 @@ func TestLoad_FullConfig(t *testing.T) { Version: "R909Hblt", VersionPrerelease: "ZT1JOQLn", VersionMetadata: "GtTCa13", + BuildDate: time.Date(2019, 11, 20, 5, 0, 0, 0, time.UTC), // consul configuration ConsulCoordinateUpdateBatchSize: 128, @@ -6447,7 +6448,8 @@ func TestLoad_FullConfig(t *testing.T) { ConfigFiles: []string{"testdata/full-config." + format}, HCL: []string{fmt.Sprintf(`data_dir = "%s"`, dataDir)}, } - opts.Overrides = append(opts.Overrides, versionSource("JNtPSav3", "R909Hblt", "ZT1JOQLn", "GtTCa13")) + opts.Overrides = append(opts.Overrides, versionSource("JNtPSav3", "R909Hblt", "ZT1JOQLn", "GtTCa13", + time.Date(2019, 11, 20, 5, 0, 0, 0, time.UTC))) r, err := Load(opts) require.NoError(t, err) prototest.AssertDeepEqual(t, expected, r.RuntimeConfig) @@ -6641,6 +6643,7 @@ func parseCIDR(t *testing.T, cidr string) *net.IPNet { func TestRuntimeConfig_Sanitize(t *testing.T) { rt := RuntimeConfig{ BindAddr: &net.IPAddr{IP: net.ParseIP("127.0.0.1")}, + BuildDate: time.Date(2019, 11, 20, 5, 0, 0, 0, time.UTC), CheckOutputMaxSize: checks.DefaultBufSize, SerfAdvertiseAddrLAN: &net.TCPAddr{IP: net.ParseIP("1.2.3.4"), Port: 5678}, DNSAddrs: []net.Addr{ diff --git a/agent/config/testdata/TestRuntimeConfig_Sanitize.golden b/agent/config/testdata/TestRuntimeConfig_Sanitize.golden index 090a7191a8..79f3cc25ee 100644 --- a/agent/config/testdata/TestRuntimeConfig_Sanitize.golden +++ b/agent/config/testdata/TestRuntimeConfig_Sanitize.golden @@ -76,6 +76,7 @@ "BindAddr": "127.0.0.1", "Bootstrap": false, "BootstrapExpect": 0, + "BuildDate": "2019-11-20 05:00:00 +0000 UTC", "Cache": { "EntryFetchMaxBurst": 42, "EntryFetchRate": 0.334,