cli: only create Terraform client when needed (#2536)

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2023-10-30 12:43:38 +01:00 committed by GitHub
parent 238a3c222b
commit 5f05810ad7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 32 deletions

View file

@ -277,7 +277,7 @@ func TestInitialize(t *testing.T) {
getClusterAttestationConfigErr: k8serrors.NewNotFound(schema.GroupResource{}, ""),
}, nil
},
clusterUpgrader: stubTerraformUpgrader{},
newClusterApplier: func(ctx context.Context) (clusterUpgrader, error) { return stubTerraformUpgrader{}, nil },
}
err := i.apply(cmd, stubAttestationFetcher{}, "test")