Skip to content

Commit b1ccfcc

Browse files
author
Hayim.Shaul@ibm.com
committed
new StartPostgres function api
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe3.haifa.ibm.com>
1 parent c9a0e76 commit b1ccfcc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

token/services/db/sql/postgres/postgres_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ SPDX-License-Identifier: Apache-2.0
77
package postgres
88

99
import (
10+
"context"
1011
"testing"
1112

1213
"github.com/hyperledger-labs/fabric-smart-client/platform/view/services/storage/driver/common/mock"
@@ -69,8 +70,8 @@ func postgresCfg(pgConnStr string, name string) *mock.ConfigProvider {
6970

7071
func startContainer(t *testing.T) (func(), string) {
7172
t.Helper()
72-
cfg := postgres.DefaultConfig("test-db")
73-
terminate, err := postgres.StartPostgresWithFmt([]*postgres.ContainerConfig{cfg})
73+
cfg := postgres.DefaultConfig(postgres.WithDBName("test-db"))
74+
terminate, _, err := postgres.StartPostgres(context.Background(), cfg, nil)
7475
assert.NoError(t, err)
7576
return terminate, cfg.DataSource()
7677
}

0 commit comments

Comments
 (0)