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 Dec 12, 2023
1 parent 36d4cd1 commit ca422cd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pkg/resources/external_oauth_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func CreateExternalOauthIntegration(d *schema.ResourceData, meta interface{}) er

d.SetId(ExternalOauthIntegrationID(&input.ExternalOauthIntegration3))

return nil
return ReadExternalOauthIntegration(d, meta)
}

// ReadExternalOauthIntegration implements schema.ReadFunc.
Expand Down Expand Up @@ -543,7 +543,7 @@ func UpdateExternalOauthIntegration(d *schema.ResourceData, meta interface{}) er
}
}

return nil
return ReadExternalOauthIntegration(d, meta)
}

// DeleteExternalOauthIntegration implements schema.DeleteFunc.
Expand Down
10 changes: 6 additions & 4 deletions pkg/resources/user_public_keys_acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@ func TestAcc_UserPublicKeys(t *testing.T) {

resource.TestCheckResourceAttr("snowflake_user_public_keys.foobar", "rsa_public_key", sshkey1),
resource.TestCheckResourceAttr("snowflake_user_public_keys.foobar", "rsa_public_key_2", sshkey2),
resource.TestCheckNoResourceAttr("snowflake_user_public_keys.foobar", "has_rsa_public_key"),
),
},
// IMPORT
{
ResourceName: "snowflake_user.w",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"password", "rsa_public_key", "rsa_public_key_2", "must_change_password"},
ResourceName: "snowflake_user.w",
ImportState: true,
ImportStateVerify: true,
// Ignoring because keys are currently altered outside of snowflake_user resource (in snowflake_user_public_keys).
ImportStateVerifyIgnore: []string{"password", "rsa_public_key", "rsa_public_key_2", "has_rsa_public_key", "must_change_password"},
},
},
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/warehouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ func UpdateWarehouse(d *schema.ResourceData, meta interface{}) error {
}
}

return nil
return ReadWarehouse(d, meta)
}

// DeleteWarehouse implements schema.DeleteFunc.
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/warehouse_acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestAcc_Warehouse(t *testing.T) {
resource.TestCheckResourceAttr("snowflake_warehouse.w", "name", prefix2),
resource.TestCheckResourceAttr("snowflake_warehouse.w", "comment", "test comment 2"),
resource.TestCheckResourceAttr("snowflake_warehouse.w", "auto_suspend", "60"),
resource.TestCheckResourceAttr("snowflake_warehouse.w", "warehouse_size", "X-LARGE"),
resource.TestCheckResourceAttr("snowflake_warehouse.w", "warehouse_size", "XLARGE"),
),
},
// IMPORT
Expand Down

0 comments on commit ca422cd

Please sign in to comment.