Skip to content

Commit

Permalink
Merge pull request #1174 from yati1998/spec
Browse files Browse the repository at this point in the history
Update CSI Spec
  • Loading branch information
k8s-ci-robot authored Nov 5, 2024
2 parents 8d54afd + 0685454 commit 53f161f
Show file tree
Hide file tree
Showing 13 changed files with 8,632 additions and 4,534 deletions.
3 changes: 2 additions & 1 deletion cmd/csi-snapshotter/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/kubernetes-csi/csi-lib-utils/connection"
"github.com/kubernetes-csi/csi-lib-utils/metrics"
"github.com/kubernetes-csi/csi-test/v5/driver"
"github.com/kubernetes-csi/csi-test/v5/utils"

"google.golang.org/grpc"
)
Expand Down Expand Up @@ -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)

ok, err := supportsControllerCreateSnapshot(context.Background(), csiConn)
if test.expectError && err == nil {
Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ module github.com/kubernetes-csi/external-snapshotter/v8
go 1.23.1

require (
github.com/container-storage-interface/spec v1.9.0
// TODO: update version once it is officially released
github.com/container-storage-interface/spec v1.10.1-0.20241022120259-f6b6d53db606
github.com/evanphx/json-patch v5.9.0+incompatible
github.com/fsnotify/fsnotify v1.8.0
github.com/golang/mock v1.6.0
github.com/google/gofuzz v1.2.0
github.com/kubernetes-csi/csi-lib-utils v0.19.0
github.com/kubernetes-csi/csi-test/v5 v5.2.0
github.com/kubernetes-csi/csi-test/v5 v5.3.1
github.com/kubernetes-csi/external-snapshotter/client/v8 v8.0.0
github.com/prometheus/client_golang v1.20.5
github.com/prometheus/client_model v0.6.1
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/container-storage-interface/spec v1.9.0 h1:zKtX4STsq31Knz3gciCYCi1SXtO2HJDecIjDVboYavY=
github.com/container-storage-interface/spec v1.9.0/go.mod h1:ZfDu+3ZRyeVqxZM0Ds19MVLkN2d1XJ5MAfi1L3VjlT0=
github.com/container-storage-interface/spec v1.10.1-0.20241022120259-f6b6d53db606 h1:PtXpku0GhORJLv9g2RRenXXdmJB+dklYJXSeJePxPmo=
github.com/container-storage-interface/spec v1.10.1-0.20241022120259-f6b6d53db606/go.mod h1:DtUvaQszPml1YJfIK7c00mlv6/g4wNMLanLgiUbKFRI=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -71,8 +71,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kubernetes-csi/csi-lib-utils v0.19.0 h1:3sT8mL9+St2acyrEtuR7CQ5L78GR4lgsb+sfon9tGfA=
github.com/kubernetes-csi/csi-lib-utils v0.19.0/go.mod h1:lBuMKvoyd8c3EG+itmnVWApLDHnLkU7ibxxZSPuOw0M=
github.com/kubernetes-csi/csi-test/v5 v5.2.0 h1:Z+sdARWC6VrONrxB24clCLCmnqCnZF7dzXtzx8eM35o=
github.com/kubernetes-csi/csi-test/v5 v5.2.0/go.mod h1:o/c5w+NU3RUNE+DbVRhEUTmkQVBGk+tFOB2yPXT8teo=
github.com/kubernetes-csi/csi-test/v5 v5.3.1 h1:Wiukp1In+kif+BFo6q2ExjgB+MbrAz4jZWzGfijypuY=
github.com/kubernetes-csi/csi-test/v5 v5.3.1/go.mod h1:7hA2cSYJ6T8CraEZPA6zqkLZwemjBD54XAnPsPC3VpA=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
Expand Down
7 changes: 4 additions & 3 deletions pkg/snapshotter/snapshotter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/kubernetes-csi/csi-lib-utils/connection"
"github.com/kubernetes-csi/csi-lib-utils/metrics"
"github.com/kubernetes-csi/csi-test/v5/driver"
"github.com/kubernetes-csi/csi-test/v5/utils"

"google.golang.org/grpc"
"google.golang.org/grpc/codes"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
}
}

Expand Down
Loading

0 comments on commit 53f161f

Please sign in to comment.