From d799c7a397c682c76c2bb31ffca4a66c33030d78 Mon Sep 17 00:00:00 2001 From: Ben Brooks Date: Wed, 5 Jun 2024 14:55:09 +0100 Subject: [PATCH] Add unset values in TestFillConfigWithFlagsValidVals --- rest/config_flags_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rest/config_flags_test.go b/rest/config_flags_test.go index efbcb5a1ca..9612857476 100644 --- a/rest/config_flags_test.go +++ b/rest/config_flags_test.go @@ -101,6 +101,12 @@ func TestFillConfigWithFlagsValidVals(t *testing.T) { assert.Equal(t, "warn", config.Logging.Console.LogLevel.String()) assert.Equal(t, base.NewConfigDuration(time.Hour*5+time.Minute*2+time.Second*33), config.Replicator.MaxHeartbeat) assert.Equal(t, uint64(12345), config.MaxFileDescriptors) + + // unset values + assert.Equal(t, "", config.Bootstrap.X509CertPath) // String + assert.Nil(t, config.API.CORS.Headers) // []string + assert.Nil(t, config.API.AdminInterfaceAuthentication) // *bool + assert.Nil(t, config.Logging.Warn.Rotation.RotationInterval) // *base.ConfigDuration } // Manually test different types of flags with invalid values