Skip to content

Commit 71fb3ce

Browse files
committed
Add descriptions to To() expectations in NodeUnpublishVolume
Without descriptions, To() expectations are unnecessarily difficult to understand.
1 parent a6fb595 commit 71fb3ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/sanity/node.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,11 @@ var _ = DescribeSanity("Node Service", func(sc *TestContext) {
428428
VolumeId: sc.Config.IDGen.GenerateUniqueValidVolumeID(),
429429
TargetPath: sc.StagingPath,
430430
})
431-
Expect(err).To(HaveOccurred())
431+
Expect(err).To(HaveOccurred(), "failed to unpublish volume from node")
432432

433433
serverError, ok := status.FromError(err)
434-
Expect(ok).To(BeTrue())
435-
Expect(serverError.Code()).To(Equal(codes.NotFound))
434+
Expect(ok).To(BeTrue(), "error from NodeUnpublishVolume is not a gRPC error")
435+
Expect(serverError.Code()).To(Equal(codes.NotFound), "unexpected error code")
436436
})
437437
})
438438

0 commit comments

Comments
 (0)