mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-02 22:34:56 -04:00
cli: add --workspace
flag to set base directory for Constellation workspace (#2148)
* Remove `--config` and `--master-secret` falgs * Add `--workspace` flag * In CLI, only work on files with paths created from `cli/internal/cmd` * Properly print values for GCP on IAM create when not directly updating the config --------- Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
ec33530c38
commit
d1ace13713
57 changed files with 966 additions and 1145 deletions
|
@ -92,7 +92,7 @@ func TestPrepareCluster(t *testing.T) {
|
|||
c := &Client{
|
||||
tf: &stubTerraform{},
|
||||
file: file.NewHandler(tc.fs),
|
||||
workingDir: constants.TerraformWorkingDir,
|
||||
workingDir: "unittest",
|
||||
}
|
||||
|
||||
path := path.Join(tc.pathBase, strings.ToLower(tc.provider.String()))
|
||||
|
@ -445,7 +445,7 @@ func TestCreateCluster(t *testing.T) {
|
|||
c := &Client{
|
||||
tf: tc.tf,
|
||||
file: file.NewHandler(tc.fs),
|
||||
workingDir: constants.TerraformWorkingDir,
|
||||
workingDir: "unittest",
|
||||
}
|
||||
|
||||
path := path.Join(tc.pathBase, strings.ToLower(tc.provider.String()))
|
||||
|
@ -835,7 +835,7 @@ func TestCleanupWorkspace(t *testing.T) {
|
|||
c := &Client{
|
||||
file: file,
|
||||
tf: &stubTerraform{},
|
||||
workingDir: constants.TerraformWorkingDir,
|
||||
workingDir: "unittest",
|
||||
}
|
||||
|
||||
err := c.CleanUpWorkspace()
|
||||
|
@ -1019,7 +1019,7 @@ func TestPlan(t *testing.T) {
|
|||
workingDir: tc.pathBase,
|
||||
}
|
||||
|
||||
_, err := c.Plan(context.Background(), LogLevelDebug, constants.TerraformUpgradePlanFile)
|
||||
_, err := c.Plan(context.Background(), LogLevelDebug)
|
||||
if tc.wantErr {
|
||||
require.Error(err)
|
||||
} else {
|
||||
|
@ -1078,7 +1078,7 @@ func TestShowPlan(t *testing.T) {
|
|||
workingDir: tc.pathBase,
|
||||
}
|
||||
|
||||
err := c.ShowPlan(context.Background(), LogLevelDebug, "", bytes.NewBuffer(nil))
|
||||
err := c.ShowPlan(context.Background(), LogLevelDebug, bytes.NewBuffer(nil))
|
||||
if tc.wantErr {
|
||||
require.Error(err)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue