Closed yati1998 closed 3 weeks ago
Hi @yati1998. Thanks for your PR.
I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test
on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test
label.
I understand the commands that are listed here.
/ok-to-test
We need to update again after CSI Spec is officially released.
Please add a release note.
We need to update again after CSI Spec is officially released.
sure, will add a TODO for that. lets get it for now.
You probably need to take a look at this PR: https://github.com/kubernetes-csi/external-provisioner/pull/1262
Make this change, then it should work:
$ git diff main_test.go
diff --git a/cmd/csi-snapshotter/main_test.go b/cmd/csi-snapshotter/main_test.go
index c3ecf9d5..05c93e9e 100644
--- a/cmd/csi-snapshotter/main_test.go
+++ b/cmd/csi-snapshotter/main_test.go
@@ -23,6 +23,7 @@ import (
"github.com/container-storage-interface/spec/lib/go/csi"
"github.com/golang/mock/gomock"
+ "github.com/kubernetes-csi/csi-test/v5/utils"
"github.com/kubernetes-csi/csi-lib-utils/connection"
"github.com/kubernetes-csi/csi-lib-utils/metrics"
"github.com/kubernetes-csi/csi-test/v5/driver"
@@ -125,7 +126,7 @@ func Test_supportsControllerCreateSnapshot(t *testing.T) {
}
// Setup expectation
- controllerServer.EXPECT().ControllerGetCapabilities(gomock.Any(), in).Return(out, injectedErr).Times(1)
+ controllerServer.EXPECT().ControllerGetCapabilities(gomock.Any(), utils.Protobuf(in)).Return(out, injectedErr).Times(1)
Also here:
$ git diff snapshotter_test.go
diff --git a/pkg/snapshotter/snapshotter_test.go b/pkg/snapshotter/snapshotter_test.go
index 148848ff..8d6c79ef 100644
--- a/pkg/snapshotter/snapshotter_test.go
+++ b/pkg/snapshotter/snapshotter_test.go
@@ -25,6 +25,7 @@ import (
"github.com/container-storage-interface/spec/lib/go/csi"
"github.com/golang/mock/gomock"
+ "github.com/kubernetes-csi/csi-test/v5/utils"
"github.com/kubernetes-csi/csi-lib-utils/connection"
"github.com/kubernetes-csi/csi-lib-utils/metrics"
"github.com/kubernetes-csi/csi-test/v5/driver"
@@ -210,7 +211,7 @@ func TestCreateSnapshot(t *testing.T) {
// Setup expectation
if in != nil {
identityServer.EXPECT().GetPluginInfo(gomock.Any(), gomock.Any()).Return(pluginInfoOutput, nil).Times(1)
- controllerServer.EXPECT().CreateSnapshot(gomock.Any(), in).Return(out, injectedErr).Times(1)
+ controllerServer.EXPECT().CreateSnapshot(gomock.Any(), utils.Protobuf(in)).Return(out, injectedErr).Times(1)
}
s := NewSnapshotter(csiConn)
@@ -318,7 +319,7 @@ func TestDeleteSnapshot(t *testing.T) {
// Setup expectation
if in != nil {
- controllerServer.EXPECT().DeleteSnapshot(gomock.Any(), in).Return(out, injectedErr).Times(1)
+ controllerServer.EXPECT().DeleteSnapshot(gomock.Any(), utils.Protobuf(in)).Return(out, injectedErr).Times(1)
}
s := NewSnapshotter(csiConn)
@@ -463,7 +464,7 @@ func TestGetSnapshotStatus(t *testing.T) {
Capabilities: controllerCapabilities,
}, nil).Times(1)
if test.listSnapshotsSupported {
- controllerServer.EXPECT().ListSnapshots(gomock.Any(), in).Return(out, injectedErr).Times(1)
+ controllerServer.EXPECT().ListSnapshots(gomock.Any(), utils.Protobuf(in)).Return(out, injectedErr).Times(1)
}
}
/retest
/lgtm /approve
Trivy failure is unrelated to this change.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: xing-yang, yati1998
The full list of commands accepted by this bot can be found here.
The pull request process is described here
this commit updates csi spec version to include latest changes for volume group snapshot