mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-05 04:55:22 +00:00
Address review comments
Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
This commit is contained in:
@@ -60,24 +60,24 @@ var _ = Describe("[Restic] Velero tests on cluster using the plugin provider for
|
||||
"Failed to successfully backup and restore Kibishii namespace")
|
||||
})
|
||||
|
||||
It("should successfully back up and restore to multiple BackupStorageLocations with unique credentials", func() {
|
||||
if additionalBslProvider == "" {
|
||||
It("should successfully back up and restore to an additional BackupStorageLocation with unique credentials", func() {
|
||||
if additionalBSLProvider == "" {
|
||||
Skip("no additional BSL provider given, not running multiple BackupStorageLocation with unique credentials tests")
|
||||
}
|
||||
|
||||
if additionalBslBucket == "" {
|
||||
if additionalBSLBucket == "" {
|
||||
Skip("no additional BSL bucket given, not running multiple BackupStorageLocation with unique credentials tests")
|
||||
}
|
||||
|
||||
if additionalBslCredentials == "" {
|
||||
if additionalBSLCredentials == "" {
|
||||
Skip("no additional BSL credentials given, not running multiple BackupStorageLocation with unique credentials tests")
|
||||
}
|
||||
|
||||
// Create Secret for additional BSL
|
||||
secretName := fmt.Sprintf("bsl-credentials-%s", uuidgen)
|
||||
secretKey := fmt.Sprintf("creds-%s", additionalBslProvider)
|
||||
secretKey := fmt.Sprintf("creds-%s", additionalBSLProvider)
|
||||
files := map[string]string{
|
||||
secretKey: additionalBslCredentials,
|
||||
secretKey: additionalBSLCredentials,
|
||||
}
|
||||
|
||||
Expect(CreateSecretFromFiles(context.TODO(), client, veleroNamespace, secretName, files)).To(Succeed())
|
||||
@@ -88,10 +88,10 @@ var _ = Describe("[Restic] Velero tests on cluster using the plugin provider for
|
||||
veleroCLI,
|
||||
veleroNamespace,
|
||||
additionalBsl,
|
||||
additionalBslProvider,
|
||||
additionalBslBucket,
|
||||
additionalBslPrefix,
|
||||
additionalBslConfig,
|
||||
additionalBSLProvider,
|
||||
additionalBSLBucket,
|
||||
additionalBSLPrefix,
|
||||
additionalBSLConfig,
|
||||
secretName,
|
||||
secretKey,
|
||||
)).To(Succeed())
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
var (
|
||||
veleroCLI, veleroImage, cloudCredentialsFile, bslConfig, bslBucket, bslPrefix, vslConfig, cloudProvider, objectStoreProvider, veleroNamespace string
|
||||
additionalBslProvider, additionalBslBucket, additionalBslPrefix, additionalBslConfig, additionalBslCredentials string
|
||||
additionalBSLProvider, additionalBSLBucket, additionalBSLPrefix, additionalBSLConfig, additionalBSLCredentials string
|
||||
installVelero, useVolumeSnapshots bool
|
||||
)
|
||||
|
||||
@@ -29,11 +29,11 @@ func init() {
|
||||
flag.BoolVar(&useVolumeSnapshots, "use-volume-snapshots", false, "Use volume-snapshotter plugin for volume backup. Optional")
|
||||
|
||||
// Flags to create an additional BSL for multiple credentials test
|
||||
flag.StringVar(&additionalBslProvider, "additional-bsl-object-store-provider", "", "Provider of object store plugin for additional backup storage location. Required if testing multiple credentials support.")
|
||||
flag.StringVar(&additionalBslBucket, "additional-bsl-bucket", "", "name of the object storage bucket for additional backup storage location. Required if testing multiple credentials support.")
|
||||
flag.StringVar(&additionalBslPrefix, "additional-bsl-prefix", "", "prefix under which all Velero data should be stored within the bucket for additional backup storage location. Optional.")
|
||||
flag.StringVar(&additionalBslConfig, "additional-bsl-config", "", "configuration to use for the additional backup storage location. Format is key1=value1,key2=value2")
|
||||
flag.StringVar(&additionalBslCredentials, "additional-bsl-credentials-file", "", "file containing credentials for additional backup storage location provider. Required if testing multiple credentials support.")
|
||||
flag.StringVar(&additionalBSLProvider, "additional-bsl-object-store-provider", "", "Provider of object store plugin for additional backup storage location. Required if testing multiple credentials support.")
|
||||
flag.StringVar(&additionalBSLBucket, "additional-bsl-bucket", "", "name of the object storage bucket for additional backup storage location. Required if testing multiple credentials support.")
|
||||
flag.StringVar(&additionalBSLPrefix, "additional-bsl-prefix", "", "prefix under which all Velero data should be stored within the bucket for additional backup storage location. Optional.")
|
||||
flag.StringVar(&additionalBSLConfig, "additional-bsl-config", "", "configuration to use for the additional backup storage location. Format is key1=value1,key2=value2")
|
||||
flag.StringVar(&additionalBSLCredentials, "additional-bsl-credentials-file", "", "file containing credentials for additional backup storage location provider. Required if testing multiple credentials support.")
|
||||
}
|
||||
|
||||
func TestE2e(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user