Skip to content

Commit 2705c12

Browse files
committed
fix: Format test files with gofmt to resolve linting issues
1 parent 7a68b3a commit 2705c12

File tree

6 files changed

+30
-30
lines changed

6 files changed

+30
-30
lines changed

pkg/exporters/http/exporter_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -903,8 +903,8 @@ func TestHTTPExporter_Reload(t *testing.T) {
903903
name: "valid config without worker pool recreation",
904904
newConfig: &types.HTTPExporterConfig{
905905
Enabled: true,
906-
Workers: 1, // Same as initial
907-
QueueSize: 5, // Same as initial
906+
Workers: 1, // Same as initial
907+
QueueSize: 5, // Same as initial
908908
Timeout: 30 * time.Second, // Same as initial
909909
Retry: types.RetryConfig{
910910
MaxAttempts: 2,
@@ -933,7 +933,7 @@ func TestHTTPExporter_Reload(t *testing.T) {
933933
name: "valid config with worker count change",
934934
newConfig: &types.HTTPExporterConfig{
935935
Enabled: true,
936-
Workers: 2, // Changed from 1 to 2
936+
Workers: 2, // Changed from 1 to 2
937937
QueueSize: 5,
938938
Timeout: 30 * time.Second,
939939
Retry: types.RetryConfig{
@@ -964,7 +964,7 @@ func TestHTTPExporter_Reload(t *testing.T) {
964964
newConfig: &types.HTTPExporterConfig{
965965
Enabled: true,
966966
Workers: 1,
967-
QueueSize: 10, // Changed from 5 to 10
967+
QueueSize: 10, // Changed from 5 to 10
968968
Timeout: 30 * time.Second,
969969
Retry: types.RetryConfig{
970970
MaxAttempts: 2,

pkg/exporters/kubernetes/exporter_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -651,16 +651,16 @@ func TestReload(t *testing.T) {
651651
name: "valid config without client recreation",
652652
config: &types.KubernetesExporterConfig{
653653
Enabled: true,
654-
UpdateInterval: 100 * time.Millisecond, // Same as initial
655-
ResyncInterval: 200 * time.Millisecond, // Same as initial
656-
HeartbeatInterval: 300 * time.Millisecond, // Same as initial
657-
Namespace: "test-namespace", // Same as initial - no client recreation
654+
UpdateInterval: 100 * time.Millisecond, // Same as initial
655+
ResyncInterval: 200 * time.Millisecond, // Same as initial
656+
HeartbeatInterval: 300 * time.Millisecond, // Same as initial
657+
Namespace: "test-namespace", // Same as initial - no client recreation
658658
Conditions: []types.ConditionConfig{},
659659
Annotations: []types.AnnotationConfig{
660660
{Key: "test-key", Value: "test-value"}, // Different annotations don't require client recreation
661661
},
662662
Events: types.EventConfig{
663-
MaxEventsPerMinute: 10, // Same as initial
663+
MaxEventsPerMinute: 10, // Same as initial
664664
DeduplicationWindow: time.Minute, // Same as initial
665665
},
666666
},
@@ -903,9 +903,9 @@ func TestAnnotationsEqual(t *testing.T) {
903903
expected: true,
904904
},
905905
{
906-
name: "both nil",
907-
old: nil,
908-
new: nil,
906+
name: "both nil",
907+
old: nil,
908+
new: nil,
909909
expected: true,
910910
},
911911
{

pkg/exporters/prometheus/exporter_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -724,9 +724,9 @@ func TestNeedsMetricsRecreation(t *testing.T) {
724724
}
725725

726726
tests := []struct {
727-
name string
728-
oldConfig *types.PrometheusExporterConfig
729-
newConfig *types.PrometheusExporterConfig
727+
name string
728+
oldConfig *types.PrometheusExporterConfig
729+
newConfig *types.PrometheusExporterConfig
730730
needRecreate bool
731731
}{
732732
{

pkg/monitors/network/connectivity_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -860,10 +860,10 @@ func TestIsValidHTTPMethod(t *testing.T) {
860860
{"GET", true},
861861
{"HEAD", true},
862862
{"OPTIONS", true},
863-
{"get", true}, // lowercase
864-
{"head", true}, // lowercase
863+
{"get", true}, // lowercase
864+
{"head", true}, // lowercase
865865
{"options", true}, // lowercase
866-
{"Get", true}, // mixed case
866+
{"Get", true}, // mixed case
867867
{"POST", false},
868868
{"PUT", false},
869869
{"DELETE", false},

pkg/reload/validator_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,8 +1058,8 @@ func TestValidate_LogPatternMonitorConfig(t *testing.T) {
10581058
expectedMsg: "",
10591059
},
10601060
{
1061-
name: "nil config",
1062-
config: nil,
1061+
name: "nil config",
1062+
config: nil,
10631063
expectedField: "monitors[0].config",
10641064
expectedMsg: "log pattern monitor requires configuration",
10651065
},
@@ -1158,8 +1158,8 @@ func TestValidate_ScriptMonitorConfig(t *testing.T) {
11581158
expectedMsg: "",
11591159
},
11601160
{
1161-
name: "nil config",
1162-
config: nil,
1161+
name: "nil config",
1162+
config: nil,
11631163
expectedField: "monitors[0].config",
11641164
expectedMsg: "script monitor requires configuration",
11651165
},
@@ -1297,8 +1297,8 @@ func TestValidate_PrometheusMonitorConfig(t *testing.T) {
12971297
expectedMsg: "",
12981298
},
12991299
{
1300-
name: "nil config",
1301-
config: nil,
1300+
name: "nil config",
1301+
config: nil,
13021302
expectedField: "monitors[0].config",
13031303
expectedMsg: "prometheus monitor requires configuration",
13041304
},

pkg/types/exporter_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import (
88
// TestExporterReloadSummary_AddResult verifies AddResult method functionality.
99
func TestExporterReloadSummary_AddResult(t *testing.T) {
1010
tests := []struct {
11-
name string
12-
results []ExporterReloadResult
13-
expectedTotal int
14-
expectedSuccessful int
15-
expectedFailed int
16-
expectedReloadableCount int
11+
name string
12+
results []ExporterReloadResult
13+
expectedTotal int
14+
expectedSuccessful int
15+
expectedFailed int
16+
expectedReloadableCount int
1717
}{
1818
{
1919
name: "empty summary",

0 commit comments

Comments
 (0)