Skip to content

Commit 7447992

Browse files
committed
wrap table tests of expiresAtSuppressFunc in t.Run so they are all evaluated on failures
1 parent 91b9815 commit 7447992

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

gitlab/resource_gitlab_deploy_token_test.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,12 @@ func TestExpiresAtSuppressFunc(t *testing.T) {
199199
}
200200

201201
for _, test := range testcases {
202-
actual := expiresAtSuppressFunc("", test.old, test.new, nil)
203-
if actual != test.expected {
204-
t.Fatalf("FAIL %s - expiresAtSuppressFunc\n\told: %s, new: %s\n\texpected: %t\n\tactual: %t",
205-
test.description, test.old, test.new, test.expected, actual)
206-
}
202+
t.Run(test.description, func(t *testing.T) {
203+
actual := expiresAtSuppressFunc("", test.old, test.new, nil)
204+
if actual != test.expected {
205+
t.Fatalf("FAIL\n\told: %s, new: %s\n\texpected: %t\n\tactual: %t",
206+
test.old, test.new, test.expected, actual)
207+
}
208+
})
207209
}
208210
}

0 commit comments

Comments
 (0)