Unverified Commit 00070b54 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #59872 from vmware/remove-production-code-usage-in-e2e-tests

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fixing diskIsAttached function **What this PR does / why we need it**: This PR fixes the `diskIsAttached` function. When disk is detached from the Node, this function was returning true, which results into time out for some vsphere e2e test cases. **Which issue(s) this PR fixes** Fixes # **Special notes for your reviewer**: Executed E2E test to verify failures are resolved with this change. **Release note**: ```release-note NONE ```
parents 4949b63e 7699a769
...@@ -719,11 +719,10 @@ func diskIsAttached(volPath string, nodeName string) (bool, error) { ...@@ -719,11 +719,10 @@ func diskIsAttached(volPath string, nodeName string) (bool, error) {
nodeName) nodeName)
return false, err return false, err
} }
if device != nil { if device == nil {
framework.Logf("diskIsAttached found the disk %q attached on node %q", return false, nil
volPath,
nodeName)
} }
framework.Logf("diskIsAttached found the disk %q attached on node %q", volPath, nodeName)
return true, nil return true, nil
} }
......
...@@ -73,7 +73,7 @@ var _ = utils.SIGDescribe("Volume FStype [Feature:vsphere]", func() { ...@@ -73,7 +73,7 @@ var _ = utils.SIGDescribe("Volume FStype [Feature:vsphere]", func() {
Bootstrap(f) Bootstrap(f)
client = f.ClientSet client = f.ClientSet
namespace = f.Namespace.Name namespace = f.Namespace.Name
Expect(GetReadySchedulableNodeInfos).NotTo(BeEmpty()) Expect(GetReadySchedulableNodeInfos()).NotTo(BeEmpty())
}) })
It("verify fstype - ext3 formatted volume", func() { It("verify fstype - ext3 formatted volume", func() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment