ci: run 'go vet' in golangci-lint; fix errors in tests

Updates #cleanup

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
Change-Id: Ice78fc907bad24c1de749a1595e212ef2db4b8bb
This commit is contained in:
Andrew Dunham
2023-12-07 14:23:01 -05:00
parent f5f21c213c
commit 3f576fc4ca
4 changed files with 50 additions and 2 deletions

View File

@@ -1328,7 +1328,9 @@ func TestParseNLArgs(t *testing.T) {
for _, tc := range tcs {
t.Run(tc.name, func(t *testing.T) {
keys, disablements, err := parseNLArgs(tc.input, tc.parseKeys, tc.parseDisablements)
if !reflect.DeepEqual(err, tc.wantErr) {
if (tc.wantErr == nil && err != nil) ||
(tc.wantErr != nil && err == nil) ||
(tc.wantErr != nil && err != nil && tc.wantErr.Error() != err.Error()) {
t.Fatalf("parseNLArgs(%v).err = %v, want %v", tc.input, err, tc.wantErr)
}