Skip to content

Commit d030c64

Browse files
committed
[e2e]Bind csi driver namespace to test namespace to avoid namespace collision
1 parent da5ec16 commit d030c64

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/e2e/storage/utils/utils.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -709,9 +709,11 @@ func FindVolumeGlobalMountPoints(hostExec HostExec, node *v1.Node) sets.String {
709709
// CreateDriverNamespace creates a namespace for CSI driver installation.
710710
// The namespace is still tracked and ensured that gets deleted when test terminates.
711711
func CreateDriverNamespace(f *framework.Framework) *v1.Namespace {
712-
ginkgo.By(fmt.Sprintf("Building a driver namespace object, basename %s", f.BaseName))
713-
namespace, err := f.CreateNamespace(f.BaseName, map[string]string{
714-
"e2e-framework": f.BaseName,
712+
ginkgo.By(fmt.Sprintf("Building a driver namespace object, basename %s", f.Namespace.Name))
713+
// The driver namespace will be bound to the test namespace in the prefix
714+
namespace, err := f.CreateNamespace(f.Namespace.Name, map[string]string{
715+
"e2e-framework": f.BaseName,
716+
"e2e-test-namespace": f.Namespace.Name,
715717
})
716718
framework.ExpectNoError(err)
717719

0 commit comments

Comments
 (0)