mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-02 06:16:08 -04:00
cli: add version validation and force flag
Version validation checks that the configured versions are not more than one minor version below the CLI's version. The validation can be disabled using --force. This is necessary for now during development as the CLI does not have a prerelease version, as our images do.
This commit is contained in:
parent
3a7b829107
commit
f204c24174
29 changed files with 590 additions and 61 deletions
|
@ -145,6 +145,7 @@ func TestInitialize(t *testing.T) {
|
|||
|
||||
// Flags
|
||||
cmd.Flags().String("config", constants.ConfigFilename, "") // register persistent flag manually
|
||||
cmd.Flags().Bool("force", true, "") // register persistent flag manually
|
||||
|
||||
// File system preparation
|
||||
fs := afero.NewMemMapFs()
|
||||
|
@ -390,6 +391,7 @@ func TestAttestation(t *testing.T) {
|
|||
|
||||
cmd := NewInitCmd()
|
||||
cmd.Flags().String("config", constants.ConfigFilename, "") // register persistent flag manually
|
||||
cmd.Flags().Bool("force", true, "") // register persistent flag manually
|
||||
var out bytes.Buffer
|
||||
cmd.SetOut(&out)
|
||||
var errOut bytes.Buffer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue