mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
Merge pull request #79945 from misterikkit/vsphere-e2e
More consistent env var handling in vsphere e2e test
This commit is contained in:
commit
77a7366486
@ -18,7 +18,6 @@ package vsphere
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/onsi/ginkgo"
|
"github.com/onsi/ginkgo"
|
||||||
"github.com/onsi/gomega"
|
"github.com/onsi/gomega"
|
||||||
@ -45,9 +44,7 @@ var _ = utils.SIGDescribe("Node Unregister [Feature:vsphere] [Slow] [Disruptive]
|
|||||||
namespace = f.Namespace.Name
|
namespace = f.Namespace.Name
|
||||||
framework.ExpectNoError(framework.WaitForAllNodesSchedulable(client, framework.TestContext.NodeSchedulableTimeout))
|
framework.ExpectNoError(framework.WaitForAllNodesSchedulable(client, framework.TestContext.NodeSchedulableTimeout))
|
||||||
framework.ExpectNoError(err)
|
framework.ExpectNoError(err)
|
||||||
workingDir = os.Getenv("VSPHERE_WORKING_DIR")
|
workingDir = GetAndExpectStringEnvVar("VSPHERE_WORKING_DIR")
|
||||||
gomega.Expect(workingDir).NotTo(gomega.BeEmpty())
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
ginkgo.It("node unregister", func() {
|
ginkgo.It("node unregister", func() {
|
||||||
@ -111,8 +108,7 @@ var _ = utils.SIGDescribe("Node Unregister [Feature:vsphere] [Slow] [Disruptive]
|
|||||||
// Sanity test that pod provisioning works
|
// Sanity test that pod provisioning works
|
||||||
ginkgo.By("Sanity check for volume lifecycle")
|
ginkgo.By("Sanity check for volume lifecycle")
|
||||||
scParameters := make(map[string]string)
|
scParameters := make(map[string]string)
|
||||||
storagePolicy := os.Getenv("VSPHERE_SPBM_GOLD_POLICY")
|
storagePolicy := GetAndExpectStringEnvVar("VSPHERE_SPBM_GOLD_POLICY")
|
||||||
gomega.Expect(storagePolicy).NotTo(gomega.BeEmpty(), "Please set VSPHERE_SPBM_GOLD_POLICY system environment")
|
|
||||||
scParameters[SpbmStoragePolicy] = storagePolicy
|
scParameters[SpbmStoragePolicy] = storagePolicy
|
||||||
invokeValidPolicyTest(f, client, namespace, scParameters)
|
invokeValidPolicyTest(f, client, namespace, scParameters)
|
||||||
})
|
})
|
||||||
|
@ -64,8 +64,8 @@ var _ = utils.SIGDescribe("Volume Operations Storm [Feature:vsphere]", func() {
|
|||||||
client = f.ClientSet
|
client = f.ClientSet
|
||||||
namespace = f.Namespace.Name
|
namespace = f.Namespace.Name
|
||||||
gomega.Expect(GetReadySchedulableNodeInfos()).NotTo(gomega.BeEmpty())
|
gomega.Expect(GetReadySchedulableNodeInfos()).NotTo(gomega.BeEmpty())
|
||||||
if os.Getenv("VOLUME_OPS_SCALE") != "" {
|
if scale := os.Getenv("VOLUME_OPS_SCALE"); scale != "" {
|
||||||
volume_ops_scale, err = strconv.Atoi(os.Getenv("VOLUME_OPS_SCALE"))
|
volume_ops_scale, err = strconv.Atoi(scale)
|
||||||
framework.ExpectNoError(err)
|
framework.ExpectNoError(err)
|
||||||
} else {
|
} else {
|
||||||
volume_ops_scale = DEFAULT_VOLUME_OPS_SCALE
|
volume_ops_scale = DEFAULT_VOLUME_OPS_SCALE
|
||||||
|
Loading…
Reference in New Issue
Block a user