Skip to content

Commit

Permalink
changes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jcieslak committed Oct 16, 2024
1 parent 8456b56 commit 0fdacc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.

This file was deleted.

8 changes: 4 additions & 4 deletions pkg/resources/object_renaming_acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func TestAcc_ShallowHierarchy_IsInConfig_RenamedInternally_WithoutDependency_Aft
TerraformVersionChecks: []tfversion.TerraformVersionCheck{
tfversion.RequireAbove(tfversion.Version1_5_0),
},
CheckDestroy: resource.ComposeAggregateTestCheckFunc(),
CheckDestroy: acc.CheckDestroy(t, resources.Schema),
Steps: []resource.TestStep{
{
Config: config.FromModels(t, databaseConfigModel, schemaModelConfig),
Expand Down Expand Up @@ -404,8 +404,8 @@ func TestAcc_ShallowHierarchy_IsInConfig_RenamedExternally_WithImplicitDependenc
},
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectResourceAction("snowflake_database.test", plancheck.ResourceActionCreate),
plancheck.ExpectResourceAction("snowflake_schema.test", plancheck.ResourceActionCreate),
plancheck.ExpectResourceAction("snowflake_database.test", plancheck.ResourceActionCreate), // Create is expected, because in refresh Read before apply the database is removing the unknown database from the state using d.SetId("") after failed ShowByID
plancheck.ExpectResourceAction("snowflake_schema.test", plancheck.ResourceActionCreate), // Create is expected, because in refresh Read before apply the schema is removing the unknown schema from the state using d.SetId("") after failed ShowByID
},
},
Config: config.FromModel(t, databaseConfigModelWithNewId) + configSchemaWithDatabaseReference(databaseConfigModelWithNewId.ResourceReference(), schemaName),
Expand Down Expand Up @@ -535,7 +535,7 @@ func TestAcc_ShallowHierarchy_IsInConfig_RenamedExternally_WithoutDependency_Aft
},
},
Config: config.FromModels(t, databaseConfigModel, schemaModelConfigWithNewDatabaseId),
ExpectError: regexp.MustCompile("Failed to create schema"), // already exists
ExpectError: regexp.MustCompile("Failed to create schema"), // already exists (because we try to create a schema on the renamed database that already has the schema that was previously created by terraform and wasn't removed)
},
},
})
Expand Down

0 comments on commit 0fdacc6

Please sign in to comment.