Skip to content

Commit

Permalink
SNOW-911146 Extract method of preparing connection in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-pmotacki committed Sep 8, 2023
1 parent eecf8bf commit fbb196c
Show file tree
Hide file tree
Showing 12 changed files with 1,226 additions and 1,581 deletions.
36 changes: 17 additions & 19 deletions auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,26 +368,24 @@ func postAuthCheckExternalBrowserFailed(_ context.Context, _ *snowflakeRestful,
}

func getDefaultSnowflakeConn() *snowflakeConn {
cfg := Config{
Account: "a",
User: "u",
Password: "p",
Database: "d",
Schema: "s",
Warehouse: "w",
Role: "r",
Region: "",
Params: make(map[string]*string),
PasscodeInPassword: false,
Passcode: "",
Application: "testapp",
}
sr := &snowflakeRestful{
TokenAccessor: getSimpleTokenAccessor(),
}
sc := &snowflakeConn{
rest: sr,
cfg: &cfg,
rest: &snowflakeRestful{
TokenAccessor: getSimpleTokenAccessor(),
},
cfg: &Config{
Account: "a",
User: "u",
Password: "p",
Database: "d",
Schema: "s",
Warehouse: "w",
Role: "r",
Region: "",
Params: make(map[string]*string),
PasscodeInPassword: false,
Passcode: "",
Application: "testapp",
},
telemetry: &snowflakeTelemetry{enabled: false},
}
return sc
Expand Down
Loading

0 comments on commit fbb196c

Please sign in to comment.