Skip to content

Commit

Permalink
Cleanup and fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jmichalak committed Nov 21, 2024
1 parent f97b0e8 commit 818d00b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
14 changes: 7 additions & 7 deletions pkg/resources/tag_association_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestTagIdentifierAndObjectIdentifier(t *testing.T) {
in := map[string]any{
"tag_id": "\"test_db\".\"test_schema\".\"test_tag\"",
"object_type": "ACCOUNT",
"object_identifier": []any{
"object_identifiers": []any{
"orgname.accountname",
},
}
Expand All @@ -31,7 +31,7 @@ func TestTagIdentifierAndObjectIdentifier(t *testing.T) {
in := map[string]any{
"tag_id": "\"test_db\".\"test_schema\".\"test_tag\"",
"object_type": "DATABASE",
"object_identifier": []any{
"object_identifiers": []any{
"test_db",
},
}
Expand All @@ -48,7 +48,7 @@ func TestTagIdentifierAndObjectIdentifier(t *testing.T) {
in := map[string]any{
"tag_id": "\"test_db\".\"test_schema\".\"test_tag\"",
"object_type": "SCHEMA",
"object_identifier": []any{
"object_identifiers": []any{
"test_db.test_schema",
},
}
Expand All @@ -65,7 +65,7 @@ func TestTagIdentifierAndObjectIdentifier(t *testing.T) {
in := map[string]any{
"tag_id": "\"test_db\".\"test_schema\".\"test_tag\"",
"object_type": "TABLE",
"object_identifier": []any{
"object_identifiers": []any{
"test_db.test_schema.test_table",
},
}
Expand All @@ -82,7 +82,7 @@ func TestTagIdentifierAndObjectIdentifier(t *testing.T) {
in := map[string]any{
"tag_id": "\"test_db\".\"test_schema\".\"test_tag\"",
"object_type": "COLUMN",
"object_identifier": []any{
"object_identifiers": []any{
"test_db.test_schema.test_table.test_column",
},
}
Expand All @@ -99,7 +99,7 @@ func TestTagIdentifierAndObjectIdentifier(t *testing.T) {
in := map[string]any{
"tag_id": "\"test_db\".\"test_schema\".\"test_tag\"",
"object_type": "COLUMN",
"object_identifier": []any{
"object_identifiers": []any{
"\"",
},
}
Expand All @@ -112,7 +112,7 @@ func TestTagIdentifierAndObjectIdentifier(t *testing.T) {
in := map[string]any{
"tag_id": "\"test_schema\".\"test_tag\"",
"object_type": "DATABASE",
"object_identifier": []any{
"object_identifiers": []any{
"test_db",
},
}
Expand Down
8 changes: 1 addition & 7 deletions pkg/sdk/tags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,6 @@ func TestTagSet(t *testing.T) {
assertOptsInvalidJoinedErrors(t, opts, errors.New("tagging for object type SEQUENCE is not supported"))
})

t.Run("validation: unsupported account", func(t *testing.T) {
opts := defaultOpts()
opts.objectType = ObjectTypeAccount
assertOptsInvalidJoinedErrors(t, opts, errors.New("tagging for object type ACCOUNT is not supported - use Tags.SetOnCurrentAccount instead"))
})

t.Run("set with all optional", func(t *testing.T) {
opts := defaultOpts()
opts.SetTags = []TagAssociation{
Expand All @@ -406,7 +400,7 @@ func TestTagSet(t *testing.T) {
},
},
}
assertOptsValidAndSQLEquals(t, opts, `ALTER %s %s SET TAG "tag1", "tag2"`, opts.objectType, accountId.FullyQualifiedName())
assertOptsValidAndSQLEquals(t, opts, `ALTER %s %s SET TAG "tag1" = 'value1'`, opts.objectType, accountId.FullyQualifiedName())
})

t.Run("set with column", func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion v1-preparations/REMAINING_GA_OBJECTS.MD
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Known issues lists open issues touching the given object. Note that some of thes
| EXTERNAL ACCESS INTEGRATION || [#2546](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2546) |
| FAILOVER GROUP || [#2516](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2516), [#2332](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2332), [#1418](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1418) |
| MANAGED ACCOUNT || - |
| NOTIFICATION INTEGRATION || [#2966](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2966), [#2965](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2965), [#1051](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1051) |
| NOTIFICATION INTEGRATION || [#3138](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3138), [#2966](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2966), [#2965](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2965), [#1051](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1051) |
| REPLICATION GROUP || [#1602](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1602) |
| SHARE || [#3051](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3051), [#2189](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2189), [#1279](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1279), [#630](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/630) |
| STORAGE INTEGRATION || [#3082](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/3082), [#2624](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2624), [#1445](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1445) |
Expand Down

0 comments on commit 818d00b

Please sign in to comment.