mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-04 15:25:00 -04:00
cli: enable constellation apply
to create new clusters (#2549)
* Allow creation of Constellation clusters using `apply` command * Add auto-completion for `--skip-phases` flag * Deprecate create command * Replace all doc references to create command with apply --------- Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
82b68df92a
commit
4c8ce55e5a
28 changed files with 989 additions and 636 deletions
|
@ -27,16 +27,20 @@ func TestMain(m *testing.M) {
|
|||
}
|
||||
|
||||
type stubCloudCreator struct {
|
||||
state state.Infrastructure
|
||||
planCalled bool
|
||||
planErr error
|
||||
applyCalled bool
|
||||
applyErr error
|
||||
state state.Infrastructure
|
||||
planCalled bool
|
||||
planDiff bool
|
||||
planErr error
|
||||
applyCalled bool
|
||||
applyErr error
|
||||
restoreErr error
|
||||
workspaceIsEmpty bool
|
||||
workspaceIsEmptyErr error
|
||||
}
|
||||
|
||||
func (c *stubCloudCreator) Plan(_ context.Context, _ *config.Config) (bool, error) {
|
||||
c.planCalled = true
|
||||
return false, c.planErr
|
||||
return c.planDiff, c.planErr
|
||||
}
|
||||
|
||||
func (c *stubCloudCreator) Apply(_ context.Context, _ cloudprovider.Provider, _ cloudcmd.RollbackBehavior) (state.Infrastructure, error) {
|
||||
|
@ -45,7 +49,11 @@ func (c *stubCloudCreator) Apply(_ context.Context, _ cloudprovider.Provider, _
|
|||
}
|
||||
|
||||
func (c *stubCloudCreator) RestoreWorkspace() error {
|
||||
return nil
|
||||
return c.restoreErr
|
||||
}
|
||||
|
||||
func (c *stubCloudCreator) WorkingDirIsEmpty() (bool, error) {
|
||||
return c.workspaceIsEmpty, c.workspaceIsEmptyErr
|
||||
}
|
||||
|
||||
type stubCloudTerminator struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue