Aleksa Sarai
caae3c051d
tests: migrate to assert.ErrorContains when possible
...
If we have an error type that we're checking a substring against, we
should really be checking using ErrorContains to indicate the right
semantics to assert.
Mostly done using these transforms:
find . -type f -name "*_test.go" | \
xargs gofmt -w -r 'assert.Assert(t, is.ErrorContains(e, s)) -> assert.ErrorContains(t, e, s)'
find . -type f -name "*_test.go" | \
xargs gofmt -w -r 'assert.Assert(t, is.Contains(err.Error(), s)) -> assert.ErrorContains(t, err, s)'
find . -type f -name "*_test.go" | \
xargs gofmt -w -r 'assert.Check(t, is.Contains(err.Error(), s)) -> assert.Check(t, is.ErrorContains(err, s))'
As well as some small fixups to helpers that were doing
strings.Contains explicitly.
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com >
2024-11-22 23:59:21 +11:00
..
2024-06-17 14:05:12 +02:00
2023-09-07 18:38:22 +00:00
2023-09-07 18:38:22 +00:00
2024-08-27 09:57:17 +02:00
2024-01-04 00:18:58 +00:00
2024-11-22 23:59:20 +11:00
2024-01-24 00:10:33 +01:00
2023-09-07 18:38:22 +00:00
2024-11-22 23:59:20 +11:00
2024-01-22 21:43:23 +01:00
2024-01-22 21:43:23 +01:00
2023-12-05 01:03:50 +01:00
2024-11-22 23:59:20 +11:00
2024-09-11 19:44:32 +02:00
2024-07-02 12:50:24 +02:00
2023-12-05 01:03:50 +01:00
2024-06-07 11:11:15 +02:00
2024-06-20 10:21:42 +02:00
2023-09-07 18:38:22 +00:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-06-18 13:18:20 +02:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2023-10-19 17:52:44 +02:00
2023-10-19 17:52:44 +02:00
2024-11-22 23:59:21 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2023-10-19 17:36:46 +02:00
2024-11-22 23:59:20 +11:00
2024-07-02 12:46:47 +02:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-01-19 12:49:53 +01:00
2024-11-22 23:59:20 +11:00
2023-09-07 18:38:22 +00:00
2024-11-22 23:59:20 +11:00
2023-10-19 17:39:17 +02:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2023-09-07 18:38:22 +00:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-09-06 21:53:09 +10:00
2024-11-22 23:59:20 +11:00
2023-09-07 18:38:22 +00:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2023-10-19 17:53:43 +02:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-11-22 23:59:20 +11:00
2024-03-04 10:15:59 +01:00
2024-11-22 23:59:20 +11:00
2023-09-07 18:38:22 +00:00
2024-11-22 23:59:20 +11:00
2023-09-07 18:38:22 +00:00
2023-09-07 18:38:22 +00:00
2024-11-22 23:59:20 +11:00
2023-10-19 18:00:00 +02:00
2024-11-22 23:59:20 +11:00
2024-01-19 12:49:53 +01:00
2023-10-19 18:01:09 +02:00
2024-11-22 23:59:20 +11:00
2023-09-11 16:39:29 +02:00
2024-11-22 23:59:20 +11:00
2023-09-07 18:38:22 +00:00
2024-11-22 23:59:20 +11:00
2023-10-19 18:02:30 +02:00
2023-11-30 12:01:06 +01:00
2024-05-31 17:41:31 +02:00
2023-09-18 15:34:20 +02:00
2023-09-07 18:38:22 +00:00
2024-06-27 23:18:48 +02:00