Skip to content

Commit

Permalink
chore: bump db versions
Browse files Browse the repository at this point in the history
  • Loading branch information
alnr committed Dec 4, 2024
1 parent 7e8300a commit 88a4bb7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
steps:
- run: |
docker create --name cockroach -p 26257:26257 \
cockroachdb/cockroach:v20.2.5 start-single-node --insecure
cockroachdb/cockroach:latest-v23.2 start-single-node --insecure
docker start cockroach
name: Start CockroachDB
- uses: ory/ci/checkout@master
Expand Down
2 changes: 1 addition & 1 deletion internal/x/dbx/dsn_cockroach.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

func RunCockroach(t testing.TB, testDB string) string {
url := dockertest.RunTestCockroachDB(t)
url := dockertest.RunTestCockroachDBWithVersion(t, "latest-v24.2")
if err := createDB(t, url, testDB); err != nil {
t.Fatal(err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/x/dbx/dsn_mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

func RunMySQL(t testing.TB, testDB string) string {
url := dockertest.RunTestMySQL(t)
url := dockertest.RunTestMySQLWithVersion(t, "8.0")
time.Sleep(1 * time.Second)
if err := createDB(t, url, testDB); err != nil {
t.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion internal/x/dbx/dsn_postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

func RunPostgres(t testing.TB, testDB string) string {
url := dockertest.RunTestPostgreSQL(t)
url := dockertest.RunTestPostgreSQLWithVersion(t, "16")
if err := createDB(t, url, testDB); err != nil {
t.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/test-resetdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ docker rm -f test_keto_postgres || true
docker rm -f test_keto_mysql || true
docker rm -f test_keto_cockroach || true

postgres_port="$(docker port "$(docker run --name test_keto_postgres -e "POSTGRES_PASSWORD=secret" -e "POSTGRES_DB=postgres" -p 0.0.0.0:0:5432 -d postgres:11.8)" 5432 | sed 's/.*:\([0-9]*\)/\1/')"
postgres_port="$(docker port "$(docker run --name test_keto_postgres -e "POSTGRES_PASSWORD=secret" -e "POSTGRES_DB=postgres" -p 0.0.0.0:0:5432 -d postgres:16)" 5432 | sed 's/.*:\([0-9]*\)/\1/')"
mysql_port="$(docker port "$(docker run --name test_keto_mysql -e "MYSQL_ROOT_PASSWORD=secret" -p 0.0.0.0:0:3306 -d mysql:8.0)" 3306 | sed 's/.*:\([0-9]*\)/\1/')"
cockroach_port="$(docker port "$(docker run --name test_keto_cockroach -p 0.0.0.0:0:26257 -d cockroachdb/cockroach:v20.2.4 start-single-node --insecure)" 26257 | sed 's/.*:\([0-9]*\)/\1/')"
cockroach_port="$(docker port "$(docker run --name test_keto_cockroach -p 0.0.0.0:0:26257 -d cockroachdb/cockroach:latest-v23.2 start-single-node --insecure)" 26257 | sed 's/.*:\([0-9]*\)/\1/')"

TEST_DATABASE_POSTGRESQL=$(printf "postgres://postgres:secret@localhost:%s/postgres?sslmode=disable" "$postgres_port")
TEST_DATABASE_MYSQL=$(printf "mysql://root:secret@(localhost:%s)/mysql?parseTime=true&multiStatements=true" "$mysql_port")
Expand Down

0 comments on commit 88a4bb7

Please sign in to comment.