Skip to content

Commit 1718504

Browse files
fix test
Signed-off-by: Andre Furlan <[email protected]>
1 parent 0ce6aaa commit 1718504

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
env:
8080
CGO_ENABLED: 0
8181

82-
- name: run integration tests
82+
- name: Contract Test
8383
run: make test-integration
8484
env:
8585
CGO_ENABLED: 0

connector.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,15 @@ type connector struct {
2121

2222
func (c *connector) Connect(ctx context.Context) (driver.Conn, error) {
2323
var initialNamespace *cli_service.TNamespace
24+
2425
if c.cfg.Catalog != "" {
26+
initialNamespace = &cli_service.TNamespace{}
2527
initialNamespace.CatalogName = cli_service.TIdentifierPtr(cli_service.TIdentifier(c.cfg.Catalog))
2628
}
2729
if c.cfg.Schema != "" {
30+
if initialNamespace == nil {
31+
initialNamespace = &cli_service.TNamespace{}
32+
}
2833
initialNamespace.SchemaName = cli_service.TIdentifierPtr(cli_service.TIdentifier(c.cfg.Schema))
2934
}
3035

0 commit comments

Comments
 (0)