-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1594 from bradengroom/pgbouncer
Run postgres datastore tests with pgbouncer
- Loading branch information
Showing
7 changed files
with
1,591 additions
and
1,406 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//go:build ci && docker && pgbouncer | ||
// +build ci,docker,pgbouncer | ||
|
||
package postgres | ||
|
||
import ( | ||
"testing" | ||
|
||
pgversion "github.com/authzed/spicedb/internal/datastore/postgres/version" | ||
|
||
"github.com/samber/lo" | ||
) | ||
|
||
var pgbouncerConfigs = lo.Map( | ||
[]string{pgversion.MinimumSupportedPostgresVersion, "14", "15", "16"}, | ||
func(postgresVersion string, _ int) postgresConfig { | ||
return postgresConfig{"head", "", postgresVersion, true} | ||
}, | ||
) | ||
|
||
func TestPostgresWithPgBouncerDatastore(t *testing.T) { | ||
t.Parallel() | ||
|
||
testPostgresDatastore(t, pgbouncerConfigs) | ||
} | ||
|
||
func TestPostgresDatastoreWithPgBouncerWithoutCommitTimestamps(t *testing.T) { | ||
t.Parallel() | ||
|
||
testPostgresDatastoreWithoutCommitTimestamps(t, pgbouncerConfigs) | ||
} |
Oops, something went wrong.