mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-27 08:40:23 +00:00
e2e: create reusable variable vaultUserSecretPath = "user-secret.yaml"
Signed-off-by: Rakshith R <rar@redhat.com>
(cherry picked from commit 1d49b6a288
)
This commit is contained in:
parent
0593071dac
commit
342867a197
@ -19,6 +19,7 @@ var (
|
|||||||
vaultConfigPath = "kms-config.yaml"
|
vaultConfigPath = "kms-config.yaml"
|
||||||
vaultTenantPath = "tenant-sa.yaml"
|
vaultTenantPath = "tenant-sa.yaml"
|
||||||
vaultTenantAdminPath = "tenant-sa-admin.yaml"
|
vaultTenantAdminPath = "tenant-sa-admin.yaml"
|
||||||
|
vaultUserSecret = "user-secret.yaml"
|
||||||
)
|
)
|
||||||
|
|
||||||
func deployVault(c kubernetes.Interface, deployTimeout int) {
|
func deployVault(c kubernetes.Interface, deployTimeout int) {
|
||||||
|
15
e2e/rbd.go
15
e2e/rbd.go
@ -803,7 +803,7 @@ var _ = Describe("RBD", func() {
|
|||||||
namespace := cephCSINamespace
|
namespace := cephCSINamespace
|
||||||
|
|
||||||
// create user Secret
|
// create user Secret
|
||||||
err = retryKubectlFile(namespace, kubectlCreate, vaultExamplePath+"user-secret.yaml", deployTimeout)
|
err = retryKubectlFile(namespace, kubectlCreate, vaultExamplePath+vaultUserSecret, deployTimeout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to create user Secret: %v", err)
|
e2elog.Failf("failed to create user Secret: %v", err)
|
||||||
}
|
}
|
||||||
@ -818,7 +818,7 @@ var _ = Describe("RBD", func() {
|
|||||||
// delete user secret
|
// delete user secret
|
||||||
err = retryKubectlFile(namespace,
|
err = retryKubectlFile(namespace,
|
||||||
kubectlDelete,
|
kubectlDelete,
|
||||||
vaultExamplePath+"user-secret.yaml",
|
vaultExamplePath+vaultUserSecret,
|
||||||
deployTimeout,
|
deployTimeout,
|
||||||
"--ignore-not-found=true")
|
"--ignore-not-found=true")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -855,7 +855,7 @@ var _ = Describe("RBD", func() {
|
|||||||
namespace := f.UniqueName
|
namespace := f.UniqueName
|
||||||
|
|
||||||
// create user Secret
|
// create user Secret
|
||||||
err = retryKubectlFile(namespace, kubectlCreate, vaultExamplePath+"user-secret.yaml", deployTimeout)
|
err = retryKubectlFile(namespace, kubectlCreate, vaultExamplePath+vaultUserSecret, deployTimeout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to create user Secret: %v", err)
|
e2elog.Failf("failed to create user Secret: %v", err)
|
||||||
}
|
}
|
||||||
@ -871,7 +871,7 @@ var _ = Describe("RBD", func() {
|
|||||||
err = retryKubectlFile(
|
err = retryKubectlFile(
|
||||||
namespace,
|
namespace,
|
||||||
kubectlDelete,
|
kubectlDelete,
|
||||||
vaultExamplePath+"user-secret.yaml",
|
vaultExamplePath+vaultUserSecret,
|
||||||
deployTimeout,
|
deployTimeout,
|
||||||
"--ignore-not-found=true")
|
"--ignore-not-found=true")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -2390,7 +2390,7 @@ var _ = Describe("RBD", func() {
|
|||||||
namespace := f.UniqueName
|
namespace := f.UniqueName
|
||||||
|
|
||||||
// create user Secret
|
// create user Secret
|
||||||
err = retryKubectlFile(namespace, kubectlCreate, vaultExamplePath+"user-secret.yaml", deployTimeout)
|
err = retryKubectlFile(namespace, kubectlCreate, vaultExamplePath+vaultUserSecret, deployTimeout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to create user Secret: %v", err)
|
e2elog.Failf("failed to create user Secret: %v", err)
|
||||||
}
|
}
|
||||||
@ -2407,10 +2407,9 @@ var _ = Describe("RBD", func() {
|
|||||||
validateRBDImageCount(f, 0, defaultRBDPool)
|
validateRBDImageCount(f, 0, defaultRBDPool)
|
||||||
|
|
||||||
// delete user secret
|
// delete user secret
|
||||||
err = retryKubectlFile(
|
err = retryKubectlFile(namespace,
|
||||||
namespace,
|
|
||||||
kubectlDelete,
|
kubectlDelete,
|
||||||
vaultExamplePath+"user-secret.yaml",
|
vaultExamplePath+vaultUserSecret,
|
||||||
deployTimeout,
|
deployTimeout,
|
||||||
"--ignore-not-found=true")
|
"--ignore-not-found=true")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user