From 06462e91c8f27daa6e45d946323055a96a382cf7 Mon Sep 17 00:00:00 2001 From: Ian Chakeres Date: Sun, 11 Mar 2018 16:52:33 -0700 Subject: [PATCH] Added e2e test for local volume provisioner discovery of new mountpoints while running. --- test/e2e/storage/persistent_volumes-local.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/e2e/storage/persistent_volumes-local.go b/test/e2e/storage/persistent_volumes-local.go index 7d1da8a5588..4e4afca6cda 100644 --- a/test/e2e/storage/persistent_volumes-local.go +++ b/test/e2e/storage/persistent_volumes-local.go @@ -403,6 +403,24 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() { By("Deleting provisioner daemonset") deleteProvisionerDaemonset(config) }) + It("should discover dynamicly created local persistent volume mountpoint in discovery directory", func() { + By("Starting a provisioner daemonset") + createProvisionerDaemonset(config) + + By("Creating a volume in discovery directory") + dynamicVolumePath := path.Join(config.discoveryDir, fmt.Sprintf("vol-%v", string(uuid.NewUUID()))) + setupLocalVolumeProvisionerMountPoint(config, dynamicVolumePath, config.node0) + + By("Waiting for the PersistentVolume to be created") + _, err := waitForLocalPersistentVolume(config.client, dynamicVolumePath) + Expect(err).NotTo(HaveOccurred()) + + By("Deleting provisioner daemonset") + deleteProvisionerDaemonset(config) + + By("Deleting volume in discovery directory") + cleanupLocalVolumeProvisionerMountPoint(config, dynamicVolumePath, config.node0) + }) }) Context("StatefulSet with pod anti-affinity", func() {