Skip to content

Commit

Permalink
removed redundant test
Browse files Browse the repository at this point in the history
  • Loading branch information
hshahconsulting committed Oct 29, 2024
1 parent 2bf5200 commit 0576b8e
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions catalog/resource_sql_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,44 +103,6 @@ func TestResourceSqlTableCreateStatement_PrimaryKeyConstraint(t *testing.T) {
assert.Contains(t, stmt, "COMMENT 'terraform managed'")
}

func TestResourceSqlTableAlterStatement_DropPrimaryKeyConstraint(t *testing.T) {
ti := &SqlTableInfo{
Name: "bar",
CatalogName: "main",
SchemaName: "foo",
TableType: "EXTERNAL",
DataSourceFormat: "DELTA",
StorageLocation: "s3://ext-main/foo/bar1",
StorageCredentialName: "somecred",
Comment: "terraform managed",
ColumnInfos: []SqlColumnInfo{
{
Name: "id",
},
{
Name: "name",
Comment: "a comment",
},
},
KeyConstraintInfos: []SqlKeyConstraintInfo{
{
SqlKeyConstraint: SqlPrimaryKeyConstraint{
Name: "id_pk",
PrimaryKey: "id",
Rely: true,
},
},
},
}
stmt := ti.buildTableCreateStatement()
assert.Contains(t, stmt, "CREATE EXTERNAL TABLE `main`.`foo`.`bar`")
assert.Contains(t, stmt, "USING DELTA")
assert.Contains(t, stmt, "(`id` NOT NULL, `name` NOT NULL COMMENT 'a comment')")
assert.Contains(t, stmt, "(CONSTRAINT `id_pk` PRIMARY KEY (id) RELY)")
assert.Contains(t, stmt, "LOCATION 's3://ext-main/foo/bar1' WITH (CREDENTIAL `somecred`)")
assert.Contains(t, stmt, "COMMENT 'terraform managed'")
}

func TestResourceSqlTableCreateStatement_ForeignKeyConstraint(t *testing.T) {
ti := &SqlTableInfo{
Name: "bar",
Expand Down

0 comments on commit 0576b8e

Please sign in to comment.