Documentation
¶
Index ¶
- func AssertRequest[T interface{ ... }](v T, err error) func(t *testing.T, want int) T
- func IsSharedPostgresDatabase() bool
- func Ok(t *testing.T, err error, resp WithStatusCode)deprecated
- func Status(t *testing.T, err error, resp WithStatusCode, status int)deprecated
- type ResponseShape
- type WithStatusCode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertRequest ¶
func IsSharedPostgresDatabase ¶
func IsSharedPostgresDatabase() bool
IsSharedPostgresDatabase reports whether the current integration run uses a shared PostgreSQL database URL, which means global settings writes can leak across concurrently running test packages.
We do this on github actions as one of the 3 databases. The test suite is actually intentionally meant to be run on a shared database to ensure that many API calls in a non-deterministic order doesn't cause any issues. The only minor issue is that a small handful of features will affect global state and causes that shared db test to fail in odd ways. To get around this, we just skip a couple of tests that touch global state as part of their process such as global authentication mode (handle vs email) all other tests will work perfectly fine in any order and mostly with t.Parallel() which is great!
func Ok
deprecated
func Ok(t *testing.T, err error, resp WithStatusCode)
Deprecated: use AssertRequest instead.
Types ¶
type ResponseShape ¶
type WithStatusCode ¶
type WithStatusCode interface {
StatusCode() int
}
Directories
¶
| Path | Synopsis |
|---|---|
|
plugin
|
|
|
test_data/crash_boot
command
|
|
|
test_data/crash_connect
command
|
|
|
test_data/crash_test
command
|
|
|
test_data/event_listener
command
|
|
|
test_data/example
command
|
|
|
test_data/supervised_config
command
|
|
|
test_data/supervised_config_v2
command
|