Skip to content

Commit 0685454

Browse files
committed
update csi spec
this commit updates csi spec version to include latest changes for volume group snapshot Signed-off-by: yati1998 <[email protected]>
1 parent 8d54afd commit 0685454

File tree

13 files changed

+8632
-4534
lines changed

13 files changed

+8632
-4534
lines changed

cmd/csi-snapshotter/main_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"github.com/kubernetes-csi/csi-lib-utils/connection"
2727
"github.com/kubernetes-csi/csi-lib-utils/metrics"
2828
"github.com/kubernetes-csi/csi-test/v5/driver"
29+
"github.com/kubernetes-csi/csi-test/v5/utils"
2930

3031
"google.golang.org/grpc"
3132
)
@@ -125,7 +126,7 @@ func Test_supportsControllerCreateSnapshot(t *testing.T) {
125126
}
126127

127128
// Setup expectation
128-
controllerServer.EXPECT().ControllerGetCapabilities(gomock.Any(), in).Return(out, injectedErr).Times(1)
129+
controllerServer.EXPECT().ControllerGetCapabilities(gomock.Any(), utils.Protobuf(in)).Return(out, injectedErr).Times(1)
129130

130131
ok, err := supportsControllerCreateSnapshot(context.Background(), csiConn)
131132
if test.expectError && err == nil {

go.mod

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ module github.com/kubernetes-csi/external-snapshotter/v8
33
go 1.23.1
44

55
require (
6-
github.com/container-storage-interface/spec v1.9.0
6+
// TODO: update version once it is officially released
7+
github.com/container-storage-interface/spec v1.10.1-0.20241022120259-f6b6d53db606
78
github.com/evanphx/json-patch v5.9.0+incompatible
89
github.com/fsnotify/fsnotify v1.8.0
910
github.com/golang/mock v1.6.0
1011
github.com/google/gofuzz v1.2.0
1112
github.com/kubernetes-csi/csi-lib-utils v0.19.0
12-
github.com/kubernetes-csi/csi-test/v5 v5.2.0
13+
github.com/kubernetes-csi/csi-test/v5 v5.3.1
1314
github.com/kubernetes-csi/external-snapshotter/client/v8 v8.0.0
1415
github.com/prometheus/client_golang v1.20.5
1516
github.com/prometheus/client_model v0.6.1

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM
44
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
55
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
66
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
7-
github.com/container-storage-interface/spec v1.9.0 h1:zKtX4STsq31Knz3gciCYCi1SXtO2HJDecIjDVboYavY=
8-
github.com/container-storage-interface/spec v1.9.0/go.mod h1:ZfDu+3ZRyeVqxZM0Ds19MVLkN2d1XJ5MAfi1L3VjlT0=
7+
github.com/container-storage-interface/spec v1.10.1-0.20241022120259-f6b6d53db606 h1:PtXpku0GhORJLv9g2RRenXXdmJB+dklYJXSeJePxPmo=
8+
github.com/container-storage-interface/spec v1.10.1-0.20241022120259-f6b6d53db606/go.mod h1:DtUvaQszPml1YJfIK7c00mlv6/g4wNMLanLgiUbKFRI=
99
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
1010
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1111
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -71,8 +71,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
7171
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
7272
github.com/kubernetes-csi/csi-lib-utils v0.19.0 h1:3sT8mL9+St2acyrEtuR7CQ5L78GR4lgsb+sfon9tGfA=
7373
github.com/kubernetes-csi/csi-lib-utils v0.19.0/go.mod h1:lBuMKvoyd8c3EG+itmnVWApLDHnLkU7ibxxZSPuOw0M=
74-
github.com/kubernetes-csi/csi-test/v5 v5.2.0 h1:Z+sdARWC6VrONrxB24clCLCmnqCnZF7dzXtzx8eM35o=
75-
github.com/kubernetes-csi/csi-test/v5 v5.2.0/go.mod h1:o/c5w+NU3RUNE+DbVRhEUTmkQVBGk+tFOB2yPXT8teo=
74+
github.com/kubernetes-csi/csi-test/v5 v5.3.1 h1:Wiukp1In+kif+BFo6q2ExjgB+MbrAz4jZWzGfijypuY=
75+
github.com/kubernetes-csi/csi-test/v5 v5.3.1/go.mod h1:7hA2cSYJ6T8CraEZPA6zqkLZwemjBD54XAnPsPC3VpA=
7676
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
7777
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
7878
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=

pkg/snapshotter/snapshotter_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"github.com/kubernetes-csi/csi-lib-utils/connection"
2929
"github.com/kubernetes-csi/csi-lib-utils/metrics"
3030
"github.com/kubernetes-csi/csi-test/v5/driver"
31+
"github.com/kubernetes-csi/csi-test/v5/utils"
3132

3233
"google.golang.org/grpc"
3334
"google.golang.org/grpc/codes"
@@ -210,7 +211,7 @@ func TestCreateSnapshot(t *testing.T) {
210211
// Setup expectation
211212
if in != nil {
212213
identityServer.EXPECT().GetPluginInfo(gomock.Any(), gomock.Any()).Return(pluginInfoOutput, nil).Times(1)
213-
controllerServer.EXPECT().CreateSnapshot(gomock.Any(), in).Return(out, injectedErr).Times(1)
214+
controllerServer.EXPECT().CreateSnapshot(gomock.Any(), utils.Protobuf(in)).Return(out, injectedErr).Times(1)
214215
}
215216

216217
s := NewSnapshotter(csiConn)
@@ -318,7 +319,7 @@ func TestDeleteSnapshot(t *testing.T) {
318319

319320
// Setup expectation
320321
if in != nil {
321-
controllerServer.EXPECT().DeleteSnapshot(gomock.Any(), in).Return(out, injectedErr).Times(1)
322+
controllerServer.EXPECT().DeleteSnapshot(gomock.Any(), utils.Protobuf(in)).Return(out, injectedErr).Times(1)
322323
}
323324

324325
s := NewSnapshotter(csiConn)
@@ -463,7 +464,7 @@ func TestGetSnapshotStatus(t *testing.T) {
463464
Capabilities: controllerCapabilities,
464465
}, nil).Times(1)
465466
if test.listSnapshotsSupported {
466-
controllerServer.EXPECT().ListSnapshots(gomock.Any(), in).Return(out, injectedErr).Times(1)
467+
controllerServer.EXPECT().ListSnapshots(gomock.Any(), utils.Protobuf(in)).Return(out, injectedErr).Times(1)
467468
}
468469
}
469470

0 commit comments

Comments
 (0)