-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix default secondary roles after BCR 2024_07 (#3040)
- fix warehouse resume - add system functions to enable/disable BCR - change default secondary roles handling - address BCR 2024_07 for default secondary roles References: #3038
- Loading branch information
1 parent
6cb0b4e
commit 2ca465a
Showing
21 changed files
with
821 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
pkg/acceptance/bettertestspoc/assert/resourceassert/user_resource_gen.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 7 additions & 4 deletions
11
pkg/acceptance/bettertestspoc/config/model/user_model_gen.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package helpers | ||
|
||
import ( | ||
"context" | ||
"testing" | ||
|
||
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
type BcrBundlesClient struct { | ||
context *TestClientContext | ||
} | ||
|
||
func NewBcrBundlesClient(context *TestClientContext) *BcrBundlesClient { | ||
return &BcrBundlesClient{ | ||
context: context, | ||
} | ||
} | ||
|
||
func (c *BcrBundlesClient) client() sdk.SystemFunctions { | ||
return c.context.client.SystemFunctions | ||
} | ||
|
||
func (c *BcrBundlesClient) EnableBcrBundle(t *testing.T, name string) { | ||
t.Helper() | ||
ctx := context.Background() | ||
|
||
err := c.client().EnableBehaviorChangeBundle(ctx, name) | ||
require.NoError(t, err) | ||
|
||
t.Cleanup(c.DisableBcrBundleFunc(t, name)) | ||
} | ||
|
||
func (c *BcrBundlesClient) DisableBcrBundleFunc(t *testing.T, name string) func() { | ||
t.Helper() | ||
ctx := context.Background() | ||
|
||
return func() { | ||
err := c.client().DisableBehaviorChangeBundle(ctx, name) | ||
require.NoError(t, err) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.