From ba389715b0f744efbf37ddb96ef8c3937a3218d1 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Mon, 9 Jul 2018 14:25:07 -0700 Subject: [PATCH 1/2] Pass volume attributes to ControllerPublish, NodeStage, NodePublish --- pkg/sanity/node.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/sanity/node.go b/pkg/sanity/node.go index 5085bc50..ca0b9db8 100644 --- a/pkg/sanity/node.go +++ b/pkg/sanity/node.go @@ -332,7 +332,8 @@ func testFullWorkflowSuccess(s csi.ControllerClient, c csi.NodeClient, controlle Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER, }, }, - Readonly: false, + VolumeAttributes: vol.GetVolume().GetAttributes(), + Readonly: false, } if secrets != nil { @@ -356,6 +357,7 @@ func testFullWorkflowSuccess(s csi.ControllerClient, c csi.NodeClient, controlle Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER, }, }, + VolumeAttributes: vol.GetVolume().GetAttributes(), StagingTargetPath: config.StagingPath, } if controllerPublishSupported { @@ -382,6 +384,7 @@ func testFullWorkflowSuccess(s csi.ControllerClient, c csi.NodeClient, controlle Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER, }, }, + VolumeAttributes: vol.GetVolume().GetAttributes(), } if nodeStageSupported { nodepubvolRequest.StagingTargetPath = config.StagingPath From 693672e64661ab8f198db30a872dae20bbc3df94 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Mon, 9 Jul 2018 14:36:10 -0700 Subject: [PATCH 2/2] Remove requirement for non-nil node capabilities --- pkg/sanity/node.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/sanity/node.go b/pkg/sanity/node.go index 5085bc50..036d9df7 100644 --- a/pkg/sanity/node.go +++ b/pkg/sanity/node.go @@ -38,7 +38,6 @@ func isNodeCapabilitySupported(c csi.NodeClient, &csi.NodeGetCapabilitiesRequest{}) Expect(err).NotTo(HaveOccurred()) Expect(caps).NotTo(BeNil()) - Expect(caps.GetCapabilities()).NotTo(BeNil()) for _, cap := range caps.GetCapabilities() { Expect(cap.GetRpc()).NotTo(BeNil()) @@ -86,7 +85,6 @@ var _ = Describe("NodeGetCapabilities [Node Server]", func() { By("checking successful response") Expect(err).NotTo(HaveOccurred()) Expect(caps).NotTo(BeNil()) - Expect(caps.GetCapabilities()).NotTo(BeNil()) for _, cap := range caps.GetCapabilities() { Expect(cap.GetRpc()).NotTo(BeNil())