Skip to content

Commit

Permalink
Fixed unit test to tolerate real PV mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
clintonk authored Oct 19, 2023
1 parent 58a45e4 commit 8e725a9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions frontend/csi/node_helpers/kubernetes/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ func TestReconcileVolumeTrackingInfo(t *testing.T) {

_ = osFs.Mkdir("/pods", 0o777)
mockVolumePublishManager.EXPECT().GetVolumeTrackingFiles().Return([]os.FileInfo{fInfo}, nil)
mockVolumePublishManager.EXPECT().UpgradeVolumeTrackingFile(ctx, volId, make(map[string]struct{}),
make(map[string]string)).
mockVolumePublishManager.EXPECT().UpgradeVolumeTrackingFile(ctx, volId, make(map[string]struct{}), gomock.Any()).
Return(false, errors.New("foo"))
err = h.reconcileVolumePublishInfo(ctx)
assert.Error(t, err, "expected error if reconcile file fails")
Expand Down

0 comments on commit 8e725a9

Please sign in to comment.