From 91920eaba8d411f246b96b35098b68c24f60f834 Mon Sep 17 00:00:00 2001 From: Paramadon Date: Tue, 10 Dec 2024 12:52:49 -0500 Subject: [PATCH] fixing lint --- extension/agenthealth/extension_test.go | 3 ++- .../agenthealth/handler/stats/provider/statuscode.go | 1 + .../handler/stats/provider/statuscode_test.go | 12 +++++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/extension/agenthealth/extension_test.go b/extension/agenthealth/extension_test.go index 69fbf43a55..7a28c01a72 100644 --- a/extension/agenthealth/extension_test.go +++ b/extension/agenthealth/extension_test.go @@ -5,12 +5,13 @@ package agenthealth import ( "context" - "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" "testing" "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component/componenttest" "go.uber.org/zap" + + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" ) func TestExtension(t *testing.T) { diff --git a/extension/agenthealth/handler/stats/provider/statuscode.go b/extension/agenthealth/handler/stats/provider/statuscode.go index 2633a41ce5..b17d571112 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode.go +++ b/extension/agenthealth/handler/stats/provider/statuscode.go @@ -10,6 +10,7 @@ import ( "time" "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" ) diff --git a/extension/agenthealth/handler/stats/provider/statuscode_test.go b/extension/agenthealth/handler/stats/provider/statuscode_test.go index c034029daa..9cdefd123d 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode_test.go +++ b/extension/agenthealth/handler/stats/provider/statuscode_test.go @@ -4,13 +4,15 @@ package provider_test import ( + "sync" + "testing" + + "github.com/stretchr/testify/assert" + "go.uber.org/zap" + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats" "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/provider" - "github.com/stretchr/testify/assert" - "go.uber.org/zap" - "sync" - "testing" ) func TestNewHandlers(t *testing.T) { @@ -73,7 +75,7 @@ func TestSingleton(t *testing.T) { } } -func TestStatsResetRace(t *testing.T) { +func TestStatsResetRace(_ *testing.T) { sp := provider.GetStatusCodeStatsProvider() // Initialize the map in a thread-safe manner