Skip to content

Commit

Permalink
fix sweeper inline GQL query
Browse files Browse the repository at this point in the history
  • Loading branch information
bendrucker committed Oct 26, 2023
1 parent 423eef0 commit 8f6234f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions observe/observe_sweeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func init() {
})
resource.AddTestSweepers("observe_snowflake_outbound_share", &resource.Sweeper{
Name: "observe_snowflake_outbound_share",
F: snowflakeShareOutboundSweeper,
F: snowflakeOutboundShareSweeper,
Dependencies: []string{
"observe_dataset_outbound_share",
},
Expand Down Expand Up @@ -730,7 +730,7 @@ func filedropSweeperFunc(pattern string) error {
return nil
}

func snowflakeShareOutboundSweeper(pattern string) error {
func snowflakeOutboundShareSweeper(pattern string) error {
client, err := sharedClient(pattern)
if err != nil {
return err
Expand All @@ -745,8 +745,8 @@ func snowflakeShareOutboundSweeper(pattern string) error {

for _, workspace := range workspaces {
result, err := client.Meta.Run(ctx, `
query snowflakeSharesOutbound($workspaceId: ObjectId!) {
searchSnowflakeShareOutbound(workspaceId: $workspaceId) {
query snowflakeOutboundShares($workspaceId: ObjectId!) {
searchSnowflakeOutboundShare(workspaceId: $workspaceId) {
results {
id
name
Expand All @@ -760,7 +760,7 @@ func snowflakeShareOutboundSweeper(pattern string) error {
return fmt.Errorf("failed to lookup snowflake outbound shares: %w", err)
}

result = result["searchSnowflakeShareOutbound"].(map[string]interface{})
result = result["searchSnowflakeOutboundShare"].(map[string]interface{})

for _, i := range result["results"].([]interface{}) {
var (
Expand Down

0 comments on commit 8f6234f

Please sign in to comment.