Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-asawicki committed Nov 27, 2024
1 parent 7a59c2e commit 1526af7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ sweep: ## destroy the whole architecture; USE ONLY FOR DEVELOPMENT ACCOUNTS
@echo "Are you sure? [y/n]" >&2
@read -r REPLY; \
if echo "$$REPLY" | grep -qG "^[yY]$$"; then \
TEST_SF_TF_ENABLE_SWEEP=1 go test -timeout 300s -run "^(TestSweepAll|Test_Sweeper_NukeStaleObjects)" ./pkg/sdk -v; \
TEST_SF_TF_ENABLE_SWEEP=1 go test -timeout=10m -run "^(TestSweepAll|Test_Sweeper_NukeStaleObjects)" ./pkg/sdk -v; \
else echo "Aborting..."; \
fi;

Expand Down
12 changes: 10 additions & 2 deletions pkg/sdk/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func Test_MergeConfig(t *testing.T) {
Protocol: "protocol1",
Host: "host1",
Port: 1,
Authenticator: 1,
Authenticator: gosnowflake.AuthTypeSnowflake,
Passcode: "passcode1",
PasscodeInPassword: false,
OktaURL: oktaUrl1,
Expand Down Expand Up @@ -226,7 +226,7 @@ func Test_MergeConfig(t *testing.T) {
Protocol: "protocol2",
Host: "host2",
Port: 2,
Authenticator: 2,
Authenticator: gosnowflake.AuthTypeOAuth,
Passcode: "passcode2",
PasscodeInPassword: true,
OktaURL: oktaUrl2,
Expand Down Expand Up @@ -268,6 +268,14 @@ func Test_MergeConfig(t *testing.T) {
config := MergeConfig(config1, config2)
require.Equal(t, config1, config)
})

t.Run("special authenticator value", func(t *testing.T) {
config := MergeConfig(&gosnowflake.Config{
Authenticator: gosnowflakeAuthTypeEmpty,
}, config1)

require.Equal(t, config1, config)
})
}

func Test_ToAuthenticationType(t *testing.T) {
Expand Down

0 comments on commit 1526af7

Please sign in to comment.