mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-05 07:45:27 -04:00
cli: add verbose debug logging (#809)
* feat: add debug logging for init command * feat: add debug logging to recover command * feat: add debug logging for configfetchmeasurements * feat: add debug logging for config generate * feat: added debug logging for miniup command * feat: add debug logging for upgrade command * feat: add debug logging for create command
This commit is contained in:
parent
baa1b37681
commit
97c72f5f32
13 changed files with 285 additions and 100 deletions
|
@ -19,6 +19,7 @@ import (
|
|||
"github.com/edgelesssys/constellation/v2/internal/config"
|
||||
"github.com/edgelesssys/constellation/v2/internal/constants"
|
||||
"github.com/edgelesssys/constellation/v2/internal/file"
|
||||
"github.com/edgelesssys/constellation/v2/internal/logger"
|
||||
"github.com/spf13/afero"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
@ -82,8 +83,8 @@ func TestParseFetchMeasurementsFlags(t *testing.T) {
|
|||
if tc.configFlag != "" {
|
||||
require.NoError(cmd.Flags().Set("config", tc.configFlag))
|
||||
}
|
||||
|
||||
flags, err := parseFetchMeasurementsFlags(cmd)
|
||||
cfm := &configFetchMeasurementsCmd{log: logger.NewTest(t)}
|
||||
flags, err := cfm.parseFetchMeasurementsFlags(cmd)
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
return
|
||||
|
@ -242,8 +243,9 @@ func TestConfigFetchMeasurements(t *testing.T) {
|
|||
|
||||
err := fileHandler.WriteYAML(constants.ConfigFilename, gcpConfig, file.OptMkdirAll)
|
||||
require.NoError(err)
|
||||
cfm := &configFetchMeasurementsCmd{log: logger.NewTest(t)}
|
||||
|
||||
assert.NoError(configFetchMeasurements(cmd, tc.verifier, cosignPublicKey, fileHandler, client))
|
||||
assert.NoError(cfm.configFetchMeasurements(cmd, tc.verifier, cosignPublicKey, fileHandler, client))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue