mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +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 (
|
||||
"context"
|
||||
"os"
|
||||
|
||||
"github.com/onsi/ginkgo"
|
||||
"github.com/onsi/gomega"
|
||||
@ -45,9 +44,7 @@ var _ = utils.SIGDescribe("Node Unregister [Feature:vsphere] [Slow] [Disruptive]
|
||||
namespace = f.Namespace.Name
|
||||
framework.ExpectNoError(framework.WaitForAllNodesSchedulable(client, framework.TestContext.NodeSchedulableTimeout))
|
||||
framework.ExpectNoError(err)
|
||||
workingDir = os.Getenv("VSPHERE_WORKING_DIR")
|
||||
gomega.Expect(workingDir).NotTo(gomega.BeEmpty())
|
||||
|
||||
workingDir = GetAndExpectStringEnvVar("VSPHERE_WORKING_DIR")
|
||||
})
|
||||
|
||||
ginkgo.It("node unregister", func() {
|
||||
@ -111,8 +108,7 @@ var _ = utils.SIGDescribe("Node Unregister [Feature:vsphere] [Slow] [Disruptive]
|
||||
// Sanity test that pod provisioning works
|
||||
ginkgo.By("Sanity check for volume lifecycle")
|
||||
scParameters := make(map[string]string)
|
||||
storagePolicy := os.Getenv("VSPHERE_SPBM_GOLD_POLICY")
|
||||
gomega.Expect(storagePolicy).NotTo(gomega.BeEmpty(), "Please set VSPHERE_SPBM_GOLD_POLICY system environment")
|
||||
storagePolicy := GetAndExpectStringEnvVar("VSPHERE_SPBM_GOLD_POLICY")
|
||||
scParameters[SpbmStoragePolicy] = storagePolicy
|
||||
invokeValidPolicyTest(f, client, namespace, scParameters)
|
||||
})
|
||||
|
@ -64,8 +64,8 @@ var _ = utils.SIGDescribe("Volume Operations Storm [Feature:vsphere]", func() {
|
||||
client = f.ClientSet
|
||||
namespace = f.Namespace.Name
|
||||
gomega.Expect(GetReadySchedulableNodeInfos()).NotTo(gomega.BeEmpty())
|
||||
if os.Getenv("VOLUME_OPS_SCALE") != "" {
|
||||
volume_ops_scale, err = strconv.Atoi(os.Getenv("VOLUME_OPS_SCALE"))
|
||||
if scale := os.Getenv("VOLUME_OPS_SCALE"); scale != "" {
|
||||
volume_ops_scale, err = strconv.Atoi(scale)
|
||||
framework.ExpectNoError(err)
|
||||
} else {
|
||||
volume_ops_scale = DEFAULT_VOLUME_OPS_SCALE
|
||||
|
Loading…
Reference in New Issue
Block a user