Commit a9258878 authored by Qiaozp's avatar Qiaozp Committed by github-actions[bot]
Browse files

Fix wrong test

Signed-off-by: default avatarQiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 62863f100795f6a2a533eb6723f5c3618fbbf22f)
No related merge requests found
Showing with 2 additions and 4 deletions
+2 -4
......@@ -243,9 +243,7 @@ func prepareToForceDeleteTerraformComponents(ctx context.Context, k8sClient clie
if def.Spec.Schematic != nil && def.Spec.Schematic.Terraform != nil {
var conf terraformapi.Configuration
if err := k8sClient.Get(ctx, client.ObjectKey{Name: c.Name, Namespace: namespace}, &conf); err != nil {
if !apierrors.IsNotFound(err) {
return err
}
return err
}
conf.Spec.ForceDelete = &forceDelete
if err := k8sClient.Update(ctx, &conf); err != nil {
......
......@@ -152,7 +152,7 @@ func TestPrepareToForceDeleteTerraformComponents(t *testing.T) {
"app1",
},
want: want{
errMsg: "no kind is registered for the type",
errMsg: "configurations.terraform.core.oam.dev \"c1\" not found",
},
},
"can read definition from application namespace": {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment