From fc4f16261ff88a2eaeb5eed0ec6e58d5fc08e950 Mon Sep 17 00:00:00 2001 From: Jerry Leung Date: Thu, 18 Jan 2024 09:59:15 -0800 Subject: [PATCH] Updated test --- extension/solarwindsapmsettingsextension/config_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/extension/solarwindsapmsettingsextension/config_test.go b/extension/solarwindsapmsettingsextension/config_test.go index 69ef3c6c07ae..fd676c77544e 100644 --- a/extension/solarwindsapmsettingsextension/config_test.go +++ b/extension/solarwindsapmsettingsextension/config_test.go @@ -58,6 +58,15 @@ func TestValidate(t *testing.T) { }, err: nil, }, + { + name: "empty_interval", + cfg: &Config{ + Endpoint: "host:12345", + Key: "token:name", + Interval: "", + }, + err: errors.New("interval has to be a duration string. Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\""), + }, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) {