mirror of
https://github.com/fluxcd/flux2.git
synced 2026-04-24 20:38:51 +00:00
Add tests for CLI flags
This includes various bug fixes, especially around the area of missing names for `<kind>/<name>` formats. Signed-off-by: Hidde Beydals <hello@hidde.co>
This commit is contained in:
parent
3c1793b6c5
commit
996bfe87ff
20 changed files with 526 additions and 54 deletions
|
|
@ -32,6 +32,10 @@ func (d *DecryptionProvider) String() string {
|
|||
}
|
||||
|
||||
func (d *DecryptionProvider) Set(str string) error {
|
||||
if strings.TrimSpace(str) == "" {
|
||||
return fmt.Errorf("no decryption provider given, must be one of: %s",
|
||||
strings.Join(supportedDecryptionProviders, ", "))
|
||||
}
|
||||
if !utils.ContainsItemString(supportedDecryptionProviders, str) {
|
||||
return fmt.Errorf("unsupported decryption provider '%s', must be one of: %s",
|
||||
str, strings.Join(supportedDecryptionProviders, ", "))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue