github.com/authzed/spicedb@v1.32.1-0.20240520085336-ebda56537386/internal/datastore/postgres/pgbouncer_test.go (about)

     1  //go:build ci && docker && pgbouncer
     2  // +build ci,docker,pgbouncer
     3  
     4  package postgres
     5  
     6  import (
     7  	"testing"
     8  
     9  	pgversion "github.com/authzed/spicedb/internal/datastore/postgres/version"
    10  
    11  	"github.com/samber/lo"
    12  )
    13  
    14  var pgbouncerConfigs = lo.Map(
    15  	[]string{pgversion.MinimumSupportedPostgresVersion, "14", "15", "16"},
    16  	func(postgresVersion string, _ int) postgresConfig {
    17  		return postgresConfig{"head", "", postgresVersion, true}
    18  	},
    19  )
    20  
    21  func TestPostgresWithPgBouncerDatastore(t *testing.T) {
    22  	t.Parallel()
    23  
    24  	testPostgresDatastore(t, pgbouncerConfigs)
    25  }
    26  
    27  func TestPostgresDatastoreWithPgBouncerWithoutCommitTimestamps(t *testing.T) {
    28  	t.Parallel()
    29  
    30  	testPostgresDatastoreWithoutCommitTimestamps(t, pgbouncerConfigs)
    31  }