mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-02 22:34:56 -04:00
cli: iam destroy (#946)
This commit is contained in:
parent
f1b331bbbd
commit
5137e9fa57
11 changed files with 659 additions and 9 deletions
|
@ -14,6 +14,7 @@ import (
|
|||
"github.com/edgelesssys/constellation/v2/cli/internal/terraform"
|
||||
"github.com/edgelesssys/constellation/v2/internal/cloud/cloudprovider"
|
||||
"github.com/edgelesssys/constellation/v2/internal/config"
|
||||
tfjson "github.com/hashicorp/terraform-json"
|
||||
|
||||
"go.uber.org/goleak"
|
||||
)
|
||||
|
@ -30,14 +31,17 @@ type stubTerraformClient struct {
|
|||
initSecret string
|
||||
iamOutput terraform.IAMOutput
|
||||
uid string
|
||||
tfjsonState *tfjson.State
|
||||
cleanUpWorkspaceCalled bool
|
||||
removeInstallerCalled bool
|
||||
destroyCalled bool
|
||||
showCalled bool
|
||||
createClusterErr error
|
||||
destroyErr error
|
||||
prepareWorkspaceErr error
|
||||
cleanUpWorkspaceErr error
|
||||
iamOutputErr error
|
||||
showErr error
|
||||
}
|
||||
|
||||
func (c *stubTerraformClient) CreateCluster(ctx context.Context) (terraform.CreateOutput, error) {
|
||||
|
@ -70,6 +74,11 @@ func (c *stubTerraformClient) RemoveInstaller() {
|
|||
c.removeInstallerCalled = true
|
||||
}
|
||||
|
||||
func (c *stubTerraformClient) Show(ctx context.Context) (*tfjson.State, error) {
|
||||
c.showCalled = true
|
||||
return c.tfjsonState, c.showErr
|
||||
}
|
||||
|
||||
type stubLibvirtRunner struct {
|
||||
startCalled bool
|
||||
stopCalled bool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue