Update controller based on snapshot v1 apis

This commit is contained in:
xing-yang
2020-11-12 03:35:12 +00:00
parent 09c22517e0
commit 5069c99ec3
21 changed files with 569 additions and 138 deletions

View File

@@ -23,7 +23,7 @@ import (
"errors"
crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v3/apis/volumesnapshot/v1beta1"
crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v3/apis/volumesnapshot/v1"
"github.com/kubernetes-csi/external-snapshotter/v3/pkg/utils"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -227,7 +227,7 @@ func TestDeleteSync(t *testing.T) {
expectedEvents: noevents,
expectedDeleteCalls: []deleteCall{{"sid1-1", nil, fmt.Errorf("mock csi driver delete error")}},
errors: []reactorError{
// Inject error to the first client.VolumesnapshotV1beta1().VolumeSnapshotContents().Delete call.
// Inject error to the first client.VolumesnapshotV1().VolumeSnapshotContents().Delete call.
// All other calls will succeed.
{"get", "secrets", errors.New("mock get invalid secret error")},
},