From 52c2b5e30641bdc69c5336e34aebcd16163ccd4b Mon Sep 17 00:00:00 2001 From: Felipe Amaral Date: Mon, 30 Sep 2024 21:58:16 +0100 Subject: [PATCH] fix: clean up --- pkg/collector/cluster_test.go | 2 +- pkg/printer/csv_test.go | 11 +---------- pkg/printer/text_test.go | 11 +---------- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/pkg/collector/cluster_test.go b/pkg/collector/cluster_test.go index c654bd19..c4aa3c08 100644 --- a/pkg/collector/cluster_test.go +++ b/pkg/collector/cluster_test.go @@ -168,7 +168,7 @@ func TestClusterCollector_getLastAppliedConfig(t *testing.T) { c: &ClusterCollector{}, resourceAnnotations: map[string]string{ "kubectl.kubernetes.io/last-applied-configuration": "Some config", - "another-annotation": "Bla", + "another-annotation": "Bla", }, wantManifest: "Some config", wantOk: true, diff --git a/pkg/printer/csv_test.go b/pkg/printer/csv_test.go index fdc773bb..1634427a 100644 --- a/pkg/printer/csv_test.go +++ b/pkg/printer/csv_test.go @@ -54,16 +54,7 @@ func TestCSVPrinterPrint(t *testing.T) { version, _ := judge.NewVersion("1.2.3") labels := map[string]interface{}{"key1": "value1"} - results := []judge.Result{{ - Name: "Name", - Namespace: "Namespace", - Kind: "Kind", - ApiVersion: "1.2.3", - RuleSet: "Test", - ReplaceWith: "4.5.6", - Since: version, - Labels: labels, - }} + results := []judge.Result{{Name: "Name", Namespace: "Namespace", Kind: "Kind", ApiVersion: "1.2.3", RuleSet: "Test", ReplaceWith: "4.5.6", Since: version, Labels: labels}} if err := tp.Print(results, config.OptionalFlags{Labels: true}); err != nil { t.Fatalf("unexpected error: %v", err) diff --git a/pkg/printer/text_test.go b/pkg/printer/text_test.go index 3ef9c6ad..ca6662ef 100644 --- a/pkg/printer/text_test.go +++ b/pkg/printer/text_test.go @@ -54,16 +54,7 @@ func Test_textPrinter_Print(t *testing.T) { version, _ := judge.NewVersion("1.2.3") labels := map[string]interface{}{"key1": "value1"} - results := []judge.Result{{ - Name: "Name", - Namespace: "Namespace", - Kind: "Kind", - ApiVersion: "1.2.3", - RuleSet: "Test", - ReplaceWith: "4.5.6", - Since: version, - Labels: labels, - }} + results := []judge.Result{{Name: "Name", Namespace: "Namespace", Kind: "Kind", ApiVersion: "1.2.3", RuleSet: "Test", ReplaceWith: "4.5.6", Since: version, Labels: labels}} if err := tp.Print(results, config.OptionalFlags{Labels: true}); err != nil { t.Fatalf("unexpected error: %v", err)