Skip to content

Commit 07b5a06

Browse files
committed
Mock driver: Return probe ready status
CSI 0.3.0 introduced probe ready status. This change adds the Ready value in ProbeResponse.
1 parent 1bf94ed commit 07b5a06

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

mock/service/identity.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package service
22

33
import (
4+
"github.com/golang/protobuf/ptypes/wrappers"
45
"golang.org/x/net/context"
56

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

26-
return &csi.ProbeResponse{}, nil
27+
return &csi.ProbeResponse{
28+
Ready: &wrappers.BoolValue{Value: true},
29+
}, nil
2730
}
2831

2932
func (s *service) GetPluginCapabilities(

pkg/sanity/identity.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ var _ = Describe("Probe [Identity Service]", func() {
7979
Expect(ok).To(BeTrue())
8080
Expect(serverError.Code() == codes.FailedPrecondition ||
8181
serverError.Code() == codes.OK).To(BeTrue())
82+
83+
Expect(res.GetReady().GetValue()).To(BeTrue())
8284
})
8385
})
8486

0 commit comments

Comments
 (0)