Skip to content

Commit

Permalink
Mock driver: Return probe ready status
Browse files Browse the repository at this point in the history
CSI 0.3.0 introduced probe ready status. This change adds the Ready
value in ProbeResponse.
  • Loading branch information
darkowlzz committed Jun 15, 2018
1 parent 1bf94ed commit 07b5a06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mock/service/identity.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package service

import (
"github.com/golang/protobuf/ptypes/wrappers"
"golang.org/x/net/context"

"github.com/container-storage-interface/spec/lib/go/csi/v0"
Expand All @@ -23,7 +24,9 @@ func (s *service) Probe(
req *csi.ProbeRequest) (
*csi.ProbeResponse, error) {

return &csi.ProbeResponse{}, nil
return &csi.ProbeResponse{
Ready: &wrappers.BoolValue{Value: true},
}, nil
}

func (s *service) GetPluginCapabilities(
Expand Down
2 changes: 2 additions & 0 deletions pkg/sanity/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ var _ = Describe("Probe [Identity Service]", func() {
Expect(ok).To(BeTrue())
Expect(serverError.Code() == codes.FailedPrecondition ||
serverError.Code() == codes.OK).To(BeTrue())

Expect(res.GetReady().GetValue()).To(BeTrue())
})
})

Expand Down

0 comments on commit 07b5a06

Please sign in to comment.