Skip to content

Commit

Permalink
cleanup slot and publication names
Browse files Browse the repository at this point in the history
  • Loading branch information
raulb committed May 23, 2024
1 parent e1e0494 commit 87f2eec
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions source_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"context"
"testing"

"github.com/conduitio/conduit-connector-postgres/source/logrepl"
"github.com/conduitio/conduit-connector-postgres/test"
"github.com/matryer/is"
)
Expand All @@ -27,6 +28,8 @@ func TestSource_Open(t *testing.T) {
ctx := context.Background()
conn := test.ConnectSimple(ctx, t, test.RepmgrConnString)
tableName := test.SetupTestTable(ctx, t, conn)
slotName := "conduitslot1"
publicationName := "conduitpub1"

s := NewSource()
err := s.Configure(
Expand All @@ -37,8 +40,8 @@ func TestSource_Open(t *testing.T) {
"snapshotMode": "initial",
"cdcMode": "logrepl",
"tableKeys": "'id",
"logrepl.slotName": "conduitslot1",
"logrepl.publicationName": "conduitpub1",
"logrepl.slotName": slotName,
"logrepl.publicationName": publicationName,
},
)
is.NoErr(err)
Expand All @@ -47,6 +50,11 @@ func TestSource_Open(t *testing.T) {
is.NoErr(err)

defer func() {
is.NoErr(logrepl.Cleanup(context.Background(), logrepl.CleanupConfig{
URL: test.RepmgrConnString,
SlotName: slotName,
PublicationName: publicationName,
}))
is.NoErr(s.Teardown(ctx))
}()
}

0 comments on commit 87f2eec

Please sign in to comment.