From a5addb82df84675a099762abbfbb3dad892b8be5 Mon Sep 17 00:00:00 2001 From: Aaron Rhodes Date: Wed, 23 Oct 2024 09:49:02 -0400 Subject: [PATCH] Finishing updating unit test to use require --- pkg/config/autodiscovery/autodiscovery_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/config/autodiscovery/autodiscovery_test.go b/pkg/config/autodiscovery/autodiscovery_test.go index e05a4a7a65cd6..811a72de9edf5 100644 --- a/pkg/config/autodiscovery/autodiscovery_test.go +++ b/pkg/config/autodiscovery/autodiscovery_test.go @@ -10,6 +10,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" pkgconfigsetup "github.com/DataDog/datadog-agent/pkg/config/setup" ) @@ -25,7 +26,7 @@ network_devices: `)) assert.NoError(t, err) _, configListeners := DiscoverComponentsFromConfig() - assert.Len(t, configListeners, 1) + require.Len(t, configListeners, 1) assert.Equal(t, "snmp", configListeners[0].Name) err = pkgconfigsetup.Datadog().ReadConfig(strings.NewReader(` @@ -57,6 +58,6 @@ network_devices: `)) assert.NoError(t, err) _, configListeners = DiscoverComponentsFromConfig() - assert.Len(t, configListeners, 1) + require.Len(t, configListeners, 1) assert.Equal(t, "snmp", configListeners[0].Name) }