Skip to content

Commit 1d70581

Browse files
committed
Update csi/v0 import to csi/
1 parent 5038544 commit 1d70581

File tree

4 files changed

+18
-17
lines changed

4 files changed

+18
-17
lines changed

pkg/controller/controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"strings"
2626
"time"
2727

28+
"k8s.io/api/core/v1"
2829
"k8s.io/apimachinery/pkg/api/resource"
2930
_ "k8s.io/apimachinery/pkg/util/json"
3031

@@ -35,7 +36,6 @@ import (
3536
snapapi "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1"
3637
snapclientset "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned"
3738

38-
"k8s.io/api/core/v1"
3939
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
4040
"k8s.io/apimachinery/pkg/util/sets"
4141
"k8s.io/apimachinery/pkg/util/validation"
@@ -48,7 +48,7 @@ import (
4848
"google.golang.org/grpc/connectivity"
4949
"google.golang.org/grpc/status"
5050

51-
"github.com/container-storage-interface/spec/lib/go/csi/v0"
51+
"github.com/container-storage-interface/spec/lib/go/csi"
5252
csiclientset "k8s.io/csi-api/pkg/client/clientset/versioned"
5353

5454
"github.com/kubernetes-csi/external-provisioner/pkg/features"

pkg/controller/controller_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"testing"
2626
"time"
2727

28-
"github.com/container-storage-interface/spec/lib/go/csi/v0"
28+
"github.com/container-storage-interface/spec/lib/go/csi"
2929
"github.com/golang/mock/gomock"
3030
"github.com/kubernetes-csi/csi-test/driver"
3131
"github.com/kubernetes-csi/external-provisioner/pkg/features"
@@ -434,9 +434,9 @@ func TestCreateDriverReturnsInvalidCapacityDuringProvision(t *testing.T) {
434434
// Requested PVC with requestedBytes storage
435435
opts := controller.VolumeOptions{
436436
PersistentVolumeReclaimPolicy: v1.PersistentVolumeReclaimDelete,
437-
PVName: "test-name",
438-
PVC: createFakePVC(requestedBytes),
439-
Parameters: map[string]string{},
437+
PVName: "test-name",
438+
PVC: createFakePVC(requestedBytes),
439+
Parameters: map[string]string{},
440440
}
441441

442442
// Drivers CreateVolume response with lower capacity bytes than request
@@ -734,8 +734,8 @@ func TestProvision(t *testing.T) {
734734
"normal provision": {
735735
volOpts: controller.VolumeOptions{
736736
PersistentVolumeReclaimPolicy: v1.PersistentVolumeReclaimDelete,
737-
PVName: "test-name",
738-
PVC: createFakePVC(requestedBytes),
737+
PVName: "test-name",
738+
PVC: createFakePVC(requestedBytes),
739739
Parameters: map[string]string{
740740
"fstype": "ext3",
741741
},
@@ -759,7 +759,7 @@ func TestProvision(t *testing.T) {
759759
"provision with access mode multi node multi writer": {
760760
volOpts: controller.VolumeOptions{
761761
PersistentVolumeReclaimPolicy: v1.PersistentVolumeReclaimDelete,
762-
PVName: "test-name",
762+
PVName: "test-name",
763763
PVC: &v1.PersistentVolumeClaim{
764764
ObjectMeta: metav1.ObjectMeta{
765765
UID: "testid",
@@ -807,7 +807,7 @@ func TestProvision(t *testing.T) {
807807
"provision with access mode multi node multi readonly": {
808808
volOpts: controller.VolumeOptions{
809809
PersistentVolumeReclaimPolicy: v1.PersistentVolumeReclaimDelete,
810-
PVName: "test-name",
810+
PVName: "test-name",
811811
PVC: &v1.PersistentVolumeClaim{
812812
ObjectMeta: metav1.ObjectMeta{
813813
UID: "testid",
@@ -855,7 +855,7 @@ func TestProvision(t *testing.T) {
855855
"provision with access mode single writer": {
856856
volOpts: controller.VolumeOptions{
857857
PersistentVolumeReclaimPolicy: v1.PersistentVolumeReclaimDelete,
858-
PVName: "test-name",
858+
PVName: "test-name",
859859
PVC: &v1.PersistentVolumeClaim{
860860
ObjectMeta: metav1.ObjectMeta{
861861
UID: "testid",
@@ -903,7 +903,7 @@ func TestProvision(t *testing.T) {
903903
"provision with multiple access modes": {
904904
volOpts: controller.VolumeOptions{
905905
PersistentVolumeReclaimPolicy: v1.PersistentVolumeReclaimDelete,
906-
PVName: "test-name",
906+
PVName: "test-name",
907907
PVC: &v1.PersistentVolumeClaim{
908908
ObjectMeta: metav1.ObjectMeta{
909909
UID: "testid",
@@ -1042,7 +1042,7 @@ func TestProvision(t *testing.T) {
10421042
"provision with mount options": {
10431043
volOpts: controller.VolumeOptions{
10441044
PersistentVolumeReclaimPolicy: v1.PersistentVolumeReclaimDelete,
1045-
PVName: "test-name",
1045+
PVName: "test-name",
10461046
PVC: &v1.PersistentVolumeClaim{
10471047
ObjectMeta: metav1.ObjectMeta{
10481048
UID: "testid",
@@ -1307,7 +1307,7 @@ func TestProvisionFromSnapshot(t *testing.T) {
13071307
"provision with volume snapshot data source": {
13081308
volOpts: controller.VolumeOptions{
13091309
PersistentVolumeReclaimPolicy: v1.PersistentVolumeReclaimDelete,
1310-
PVName: "test-name",
1310+
PVName: "test-name",
13111311
PVC: &v1.PersistentVolumeClaim{
13121312
ObjectMeta: metav1.ObjectMeta{
13131313
UID: "testid",

pkg/controller/topology.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"strconv"
2525
"strings"
2626

27-
"github.com/container-storage-interface/spec/lib/go/csi/v0"
27+
"github.com/container-storage-interface/spec/lib/go/csi"
2828
"github.com/golang/glog"
2929
"k8s.io/api/core/v1"
3030
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

pkg/controller/topology_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@ package controller
1818

1919
import (
2020
"fmt"
21-
"github.com/container-storage-interface/spec/lib/go/csi/v0"
21+
"testing"
22+
23+
"github.com/container-storage-interface/spec/lib/go/csi"
2224
"k8s.io/api/core/v1"
2325
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2426
"k8s.io/apimachinery/pkg/util/sets"
2527
fakeclientset "k8s.io/client-go/kubernetes/fake"
2628
csiv1alpha1 "k8s.io/csi-api/pkg/apis/csi/v1alpha1"
2729
fakecsiclientset "k8s.io/csi-api/pkg/client/clientset/versioned/fake"
2830
"k8s.io/kubernetes/pkg/apis/core/helper"
29-
"testing"
3031
)
3132

3233
const testDriverName = "com.example.csi/test-driver"

0 commit comments

Comments
 (0)