Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Commit a5026cc

Browse files
committed
Remove timescaledb_toolkit extension in test setup
In 3fb6f85 we already tried to address the presence of the toolkit extension in the `timescale/timescaledb-ha` docker image. Unfortunately that approach ended up with a mixed situation with toolkit sometimes being present, and sometimes not. This ended up with a hard-to-reconcile situation in the database snapshotting tooling. The simplest fix to this is to drop the timescaledb_toolkit extension from the database on test setup. Tests that require the toolkit to be present will install it themselves anyway, so nothing is lost with this approach.
1 parent 5c5dd5a commit a5026cc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pkg/internal/testhelpers/postgres_container.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,11 @@ func DbSetup(DBName string, superuser SuperuserStatus, deferNode2Setup bool, ext
270270
// that case timescaledb should always be installed by the time the
271271
// connector runs)
272272
_, err = ourDb.Exec(context.Background(), "DROP EXTENSION IF EXISTS timescaledb")
273+
// Some docker images may also have timescaledb_toolkit installed in
274+
// a template, but this messes with our upgrade tests because toolkit
275+
// was not always present. It's easier to remove it here and install it
276+
// in the specific tests which require toolkit.
277+
_, err = ourDb.Exec(context.Background(), "DROP EXTENSION IF EXISTS timescaledb_toolkit")
273278
if err != nil {
274279
_ = ourDb.Close(context.Background())
275280
return nil, err

pkg/tests/upgrade_tests/shapshot.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ var schemas = []string{
5555
"ps_trace",
5656
"public",
5757
"timescaledb_information",
58-
"toolkit_experimental",
5958
}
6059

6160
var schemasWOTimescaleDB = []string{

0 commit comments

Comments
 (0)