Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Qiaozp <[email protected]>
  • Loading branch information
chivalryq committed Aug 16, 2022
1 parent d9e9d6b commit 1f49401
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions controllers/configuration_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1384,9 +1384,9 @@ func TestTerraformDestroy(t *testing.T) {
},
VariableSecretName: fmt.Sprintf(TFVariableSecret, secretSuffix),
ConfigurationCMName: configurationCMName,
// True is default value if user ignores configuration.Spec.DeleteResource
DeleteResource: true,
}
metaWithDeleteResource := baseMeta
metaWithDeleteResource.DeleteResource = true
metaWithLegacyResource := baseMeta
metaWithLegacyResource.LegacySubResources = LegacySubResources{
Namespace: legacyNamespace,
Expand Down Expand Up @@ -1443,16 +1443,6 @@ func TestTerraformDestroy(t *testing.T) {
objects: []client.Object{readyProvider, baseConfiguration, baseConfigurationCM},
keptResources: []client.Object{baseConfigurationCM},
},
{
name: "set DeleteResource, directly clean resources",
args: args{
configuration: baseConfiguration,
meta: &metaWithDeleteResource,
},
want: want{},
objects: []client.Object{readyProvider, baseConfiguration, baseConfigurationCM},
deletedResources: []client.Object{baseConfigurationCM},
},
{
name: "provider is not ready, cloud resource couldn't be created, delete directly",
args: args{
Expand Down

0 comments on commit 1f49401

Please sign in to comment.