diff --git a/pkg/node/lethean_test.go b/pkg/node/lethean_test.go index cf0aca9..bee9189 100644 --- a/pkg/node/lethean_test.go +++ b/pkg/node/lethean_test.go @@ -17,10 +17,10 @@ func TestParseComment_Good(t *testing.T) { {"v=lthn1;cap=pool", "cap", "pool"}, {"v=lthn1", "v", "lthn1"}, } - for _, tt := range tests { - result := parseComment(tt.input) - if result[tt.key] != tt.want { - t.Errorf("parseComment(%q)[%q] = %q, want %q", tt.input, tt.key, result[tt.key], tt.want) + for _, testCase := range tests { + result := parseComment(testCase.input) + if result[testCase.key] != testCase.want { + t.Errorf("parseComment(%q)[%q] = %q, want %q", testCase.input, testCase.key, result[testCase.key], testCase.want) } } } @@ -35,10 +35,10 @@ func TestParseComment_Bad(t *testing.T) { {"k=v", "missing", ""}, {"=v", "", ""}, } - for _, tt := range tests { - result := parseComment(tt.input) - if result[tt.key] != tt.want { - t.Errorf("parseComment(%q)[%q] = %q, want %q", tt.input, tt.key, result[tt.key], tt.want) + for _, testCase := range tests { + result := parseComment(testCase.input) + if result[testCase.key] != testCase.want { + t.Errorf("parseComment(%q)[%q] = %q, want %q", testCase.input, testCase.key, result[testCase.key], testCase.want) } } } @@ -55,10 +55,10 @@ func TestParseComment_Ugly(t *testing.T) { {"duplicate keys last wins", "k=first;k=second", "k", "second"}, {"value with equals", "k=v=extra", "k", "v=extra"}, } - for _, tt := range tests { - result := parseComment(tt.input) - if result[tt.key] != tt.want { - t.Errorf("%s: parseComment(%q)[%q] = %q, want %q", tt.name, tt.input, tt.key, result[tt.key], tt.want) + for _, testCase := range tests { + result := parseComment(testCase.input) + if result[testCase.key] != testCase.want { + t.Errorf("%s: parseComment(%q)[%q] = %q, want %q", testCase.name, testCase.input, testCase.key, result[testCase.key], testCase.want) } } }