Olivier Mengué
603c2a0348
assert,require: enable parallel testing on (almost) all top tests
...
Enable parallel testing for almost all tests in packages 'assert' and
'require' by calling t.Parallel() as the first line of the test.
A few tests are incompatible and will be fixed separately. They are
marked with a FIXME.
Incompatible tests: TestFileExists, TestNoFileExists, TestDirExists,
TestNoDirExists.
Before:
$ go test -count=10 ./assert ./require
ok github.com/stretchr/testify/assert 7.575s
ok github.com/stretchr/testify/require 1.501s
After:
$ go test -count=10 ./assert ./require
ok github.com/stretchr/testify/assert 1.703s
ok github.com/stretchr/testify/require 1.245s
2025-05-23 16:17:12 +02:00
Arjun Mahishi
6e59f20c0d
http_assertions: assert that the msgAndArgs actually works in tests
...
This commit also adds the method `Failed() bool` to the mockTestingT
struct. This is usefull for asserting failure in tests
2024-02-23 22:41:24 +05:30
Arjun Mahishi
840f800f1a
http_assertions: Include msgAndArgs is some of the existing tests
...
A mix of using and not using msgAndArgs will ensure that there is no
regression.
2024-02-23 21:20:50 +05:30
hidu
ce5c2b684b
assert: fix httpCode and HTTPBody occur panic when http.Handler read body
2023-10-15 23:34:32 +02:00
Menno
ab6dc32628
fix linting errors in /assert package
2021-08-24 21:55:23 +10:00
Boyan
3184a9e141
This reverts commit 0a813b5898c0ee8d00b4f13fae21ea5df8b35e74.
2020-06-05 20:47:15 +10:00
Boyan
6353e56395
This reverts commit 9d083cac4a26c76f8d92dff41d459f3f2fc0b911.
2020-06-05 20:47:15 +10:00
Boyan
46420cf544
This reverts commit 1a43b8334acb9df58064b765cd16675cc7c2c8b3.
2020-06-05 20:47:15 +10:00
Boyan
303198d014
Revert "allow body for HTTPBodyContains and HTTPBodyNotContains for
...
POST" PR #938
This reverts commit 136026fb259a9c69ea2655a0f83500d50713ccf8.
2020-06-05 20:47:15 +10:00
gohargasparyan
136026fb25
add test cases
2020-05-04 07:47:34 +10:00
gohargasparyan
1a43b8334a
add test cases
2020-05-04 07:47:34 +10:00
gohargasparyan
9d083cac4a
go format
2020-05-04 07:47:34 +10:00
gohargasparyan
0a813b5898
allow body for HTTPBodyContains and HTTPBodyNotContains for POST
2020-05-04 07:47:34 +10:00
Martijn
e0afeb10e3
Fix whitespace issues
2020-04-06 07:42:56 +10:00
Martijn
1454493cee
Add test for HTTPStatusCode
...
For purposes of the test, status code 101 is checked as this does not overlap with the other assertions. (HTTPSuccess, HTTPRedirect and HTTPError)
2020-04-06 07:42:56 +10:00
Dinesh Kumar
6efb0c49fb
Adding url.Values to request RawQuery, fixes 522
2018-03-18 18:57:06 +00:00
Adam Medziński
78be756ee7
Fixed HTTP assertions messages formatting and removed wrong test message
2017-05-28 13:23:04 +02:00
Adam Medziński
5c9da494dd
HTTP code status assertions now fail tests
2017-02-10 14:36:52 +01:00
Victor Kryukov
8b09ac0ee8
Implement HTTP(Success|Error|Redirect) and HTTPBody(Not)Contains
2014-09-14 11:54:12 -06:00