forked from vmware-tanzu/velero
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add parameter "uploader-type" to velero server (vmware-tanzu#5212)
This commit adds the parameter "uploader-type" to velero server, add exposes the setting via "velero install" in CLI. fixes vmware-tanzu#5062 Signed-off-by: Daniel Jiang <[email protected]> Signed-off-by: Daniel Jiang <[email protected]>
- Loading branch information
1 parent
03d9a19
commit 8fa1cfb
Showing
8 changed files
with
94 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add parameter "uploader-type" to velero server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package uploader | ||
|
||
import "testing" | ||
|
||
func TestValidateUploaderType(t *testing.T) { | ||
tests := []struct { | ||
name string | ||
input string | ||
wantErr bool | ||
}{ | ||
{ | ||
"'restic' is a valid type", | ||
"restic", | ||
false, | ||
}, | ||
{ | ||
"' kopia ' is a valid type (space will be trimmed)", | ||
" kopia ", | ||
false, | ||
}, | ||
{ | ||
"'anything_else' is invalid", | ||
"anything_else", | ||
true, | ||
}, | ||
} | ||
for _, tt := range tests { | ||
t.Run(tt.name, func(t *testing.T) { | ||
if err := ValidateUploaderType(tt.input); (err != nil) != tt.wantErr { | ||
t.Errorf("ValidateUploaderType(), input = '%s' error = %v, wantErr %v", tt.input, err, tt.wantErr) | ||
} | ||
}) | ||
} | ||
} |