Skip to content

Commit

Permalink
update event tables
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-swinkler committed Nov 29, 2023
1 parent f68a196 commit 6d26e1e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sdk/event_tables_def.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ var EventTablesDef = g.NewInterface(
OptionalLimit(),
).ShowByIdOperation().DescribeOperation(
g.DescriptionMappingKindSingleValue,
"https://docs.snowflake.com/en/sql-reference/sql/describe-event-table",
"https://docs.snowflake.com/en/sql-reference/sql/desc-event-table",
g.DbStruct("eventTableDetailsRow").
Field("name", "string").
Field("kind", "string").
Expand Down
8 changes: 8 additions & 0 deletions pkg/sdk/testint/event_tables_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ func TestInt_EventTables(t *testing.T) {
assert.Equal(t, 1, len(tables))
assert.Contains(t, tables, *et1)
assert.NotContains(t, tables, *et2)
assert.Equal(t, et1.Name, tables[0].Name)
assert.Equal(t, et1.DatabaseName, tables[0].DatabaseName)
assert.Equal(t, et1.SchemaName, tables[0].SchemaName)
assert.Equal(t, et1.Owner, tables[0].Owner)
assert.Equal(t, et1.Comment, tables[0].Comment)
assert.Equal(t, et1.OwnerRoleType, tables[0].OwnerRoleType)
})

t.Run("show event table: no matches", func(t *testing.T) {
Expand All @@ -110,6 +116,8 @@ func TestInt_EventTables(t *testing.T) {
details, err := client.EventTables.Describe(ctx, id)
require.NoError(t, err)
assert.Equal(t, "TIMESTAMP", details.Name)
assert.Equal(t, "EVENT TABLE", details.Kind)
assert.Equal(t, "", details.Comment)
})

t.Run("alter event table: set and unset comment", func(t *testing.T) {
Expand Down

0 comments on commit 6d26e1e

Please sign in to comment.