mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-18 11:37:08 +02:00
tests: use testcontainers (#5341)
* tests: use testcontainers for postgres * tests: use testcontainers for minio * remove gcs test * try installing docker * skip docker on macos
This commit is contained in:
parent
0e6294d650
commit
8935ed17fa
10 changed files with 168 additions and 249 deletions
|
@ -32,16 +32,16 @@ func (m mockRegistryWatchServer) Send(res *registry.ServiceList) error {
|
|||
}
|
||||
|
||||
func TestRegistry(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
if os.Getenv("GITHUB_ACTION") != "" && runtime.GOOS == "darwin" {
|
||||
t.Skip("Github action can not run docker on MacOS")
|
||||
}
|
||||
|
||||
t.Parallel()
|
||||
|
||||
ctx, clearTimeout := context.WithTimeout(context.Background(), maxWait)
|
||||
defer clearTimeout()
|
||||
|
||||
require.NoError(t, testutil.WithTestPostgres(func(dsn string) error {
|
||||
testutil.WithTestPostgres(t, func(dsn string) {
|
||||
backend := New(ctx, dsn)
|
||||
defer backend.Close()
|
||||
|
||||
|
@ -109,9 +109,7 @@ func TestRegistry(t *testing.T) {
|
|||
err = nil
|
||||
}
|
||||
assert.NoError(t, err)
|
||||
|
||||
return nil
|
||||
}))
|
||||
})
|
||||
}
|
||||
|
||||
func TestUnmarshalJSONUnknownFields(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue