Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
cvvz committed Mar 22, 2023
1 parent 411a3d4 commit a2144d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
5 changes: 2 additions & 3 deletions pkg/blob/nodeserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (

"github.com/Azure/azure-sdk-for-go/storage"
"github.com/container-storage-interface/spec/lib/go/csi"
"github.com/moby/sys/mountinfo"

"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/klog/v2"
Expand Down Expand Up @@ -591,11 +590,11 @@ func waitForMount(path string, intervel, timeout time.Duration) error {
for {
select {
case <-timeTick:
mounted, sure, err := mountinfo.MountedFast(path)
notMount, err := mount.New("").IsLikelyNotMountPoint(path)
if err != nil {
return err
}
if sure && mounted {
if !notMount {
klog.V(2).Infof("blobfuse mount at %s success", path)
return nil
}
Expand Down
9 changes: 0 additions & 9 deletions pkg/blob/nodeserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -794,15 +794,6 @@ func Test_waitForMount(t *testing.T) {
wantErr: true,
subErrMsg: "no such file or directory",
},
{
name: "test mount success",
args: args{
path: "/",
intervel: 1 * time.Millisecond,
timeout: 10 * time.Millisecond,
},
wantErr: false,
},
}

for _, tt := range tests {
Expand Down

0 comments on commit a2144d9

Please sign in to comment.