Skip to content

Commit

Permalink
Fix controller publish in readonly mode
Browse files Browse the repository at this point in the history
Plugin's PUBLISH_READONLY capability should be verified
before publishing volume in readonly mode.
  • Loading branch information
Xin Wang committed Nov 22, 2018
1 parent 9e5a84c commit a2cf7d2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/sanity/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,9 @@ var _ = DescribeSanity("Controller Service", func(sc *SanityContext) {
})

It("should fail when the volume is already published but is incompatible", func() {
if !isControllerCapabilitySupported(c, csi.ControllerServiceCapability_RPC_PUBLISH_READONLY) {
Skip("ControllerPublishVolume.readonly field not supported")
}

// Create Volume First
By("creating a single node writer volume")
Expand Down

0 comments on commit a2cf7d2

Please sign in to comment.