diff --git a/extension/agenthealth/extension.go b/extension/agenthealth/extension.go index 26b20bc057..2f1ca916b1 100644 --- a/extension/agenthealth/extension.go +++ b/extension/agenthealth/extension.go @@ -5,11 +5,11 @@ package agenthealth import ( "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" - "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" "go.opentelemetry.io/collector/component" "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/useragent" ) diff --git a/extension/agenthealth/handler/stats/provider/process_test.go b/extension/agenthealth/handler/stats/provider/process_test.go index c265e040f9..8ab3382271 100644 --- a/extension/agenthealth/handler/stats/provider/process_test.go +++ b/extension/agenthealth/handler/stats/provider/process_test.go @@ -5,13 +5,14 @@ package provider import ( "errors" - "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" "sync" "testing" "time" "github.com/shirou/gopsutil/v3/process" "github.com/stretchr/testify/assert" + + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" ) type mockProcessMetrics struct { diff --git a/extension/agenthealth/handler/stats/provider/statuscode.go b/extension/agenthealth/handler/stats/provider/statuscode.go index fb8d1fce4c..deaaaef3c7 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode.go +++ b/extension/agenthealth/handler/stats/provider/statuscode.go @@ -1,12 +1,16 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: MIT + package provider import ( "context" - "github.com/amazon-contributing/opentelemetry-collector-contrib/extension/awsmiddleware" "net/http" "sync" "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 7f9168ae7b..b2672bab40 100644 --- a/extension/agenthealth/handler/stats/provider/statuscode_test.go +++ b/extension/agenthealth/handler/stats/provider/statuscode_test.go @@ -1,19 +1,14 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: MIT + package provider import ( - "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" "reflect" "testing" -) - -// MockOperationsFilter is a mock implementation of OperationsFilter. -type MockOperationsFilter struct { - allowedOperations map[string]bool -} -func (m *MockOperationsFilter) IsAllowed(operation string) bool { - return m.allowedOperations[operation] -} + "github.com/aws/amazon-cloudwatch-agent/extension/agenthealth/handler/stats/agent" +) func TestSingletonStatsProvider_Stats(t *testing.T) { provider := &SingletonStatsProvider{