mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-03 14:54:53 -04:00
cli: add Terraform log support (#1620)
* add Terraform logging * add TF logging to CLI * fix path * only create file if logging is enabled * update bazel files * register persistent flags manually * clidocgen * move logging code to separate file * reword yes flag parsing error * update bazel buildfile * factor out log level setting
This commit is contained in:
parent
ca1400819d
commit
1d0ee796e8
30 changed files with 688 additions and 238 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/edgelesssys/constellation/v2/cli/internal/terraform"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@ -42,7 +43,7 @@ func TestRollbackTerraform(t *testing.T) {
|
|||
client: tc.tfClient,
|
||||
}
|
||||
|
||||
err := rollbacker.rollback(context.Background())
|
||||
err := rollbacker.rollback(context.Background(), terraform.LogLevelNone)
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
if tc.tfClient.cleanUpWorkspaceErr == nil {
|
||||
|
@ -98,7 +99,7 @@ func TestRollbackQEMU(t *testing.T) {
|
|||
createdWorkspace: tc.createdWorkspace,
|
||||
}
|
||||
|
||||
err := rollbacker.rollback(context.Background())
|
||||
err := rollbacker.rollback(context.Background(), terraform.LogLevelNone)
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
if tc.tfClient.cleanUpWorkspaceErr == nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue