mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-30 23:09:23 +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
|
@ -6,6 +6,8 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"os"
|
||||
"runtime"
|
||||
"sort"
|
||||
"testing"
|
||||
"time"
|
||||
|
@ -341,7 +343,13 @@ func TestServerInvalidStorage(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestServerPostgres(t *testing.T) {
|
||||
testutil.WithTestPostgres(func(dsn string) error {
|
||||
t.Parallel()
|
||||
|
||||
if os.Getenv("GITHUB_ACTION") != "" && runtime.GOOS == "darwin" {
|
||||
t.Skip("Github action can not run docker on MacOS")
|
||||
}
|
||||
|
||||
testutil.WithTestPostgres(t, func(dsn string) {
|
||||
srv := newServer(&serverConfig{
|
||||
storageType: "postgres",
|
||||
storageConnectionString: dsn,
|
||||
|
@ -400,6 +408,5 @@ func TestServerPostgres(t *testing.T) {
|
|||
return nil
|
||||
})
|
||||
assert.NoError(t, eg.Wait())
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue