unify alias of api errors under pkg and staging

This commit is contained in:
danielqsj
2019-11-12 16:26:59 +08:00
parent fc738cbb1d
commit 5bc0e26c19
23 changed files with 116 additions and 116 deletions

View File

@@ -22,7 +22,7 @@ import (
v1 "k8s.io/api/core/v1"
storage "k8s.io/api/storage/v1"
apierrs "k8s.io/apimachinery/pkg/api/errors"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
corelisters "k8s.io/client-go/listers/core/v1"
"k8s.io/client-go/tools/cache"
@@ -423,7 +423,7 @@ func TestProvisionSync(t *testing.T) {
// Inject errors to simulate crashed API server during
// kubeclient.PersistentVolumes.Create()
{Verb: "create", Resource: "persistentvolumes", Error: errors.New("Mock creation error1")},
{Verb: "create", Resource: "persistentvolumes", Error: apierrs.NewAlreadyExists(api.Resource("persistentvolumes"), "")},
{Verb: "create", Resource: "persistentvolumes", Error: apierrors.NewAlreadyExists(api.Resource("persistentvolumes"), "")},
},
wrapTestWithPluginCalls(
nil, // recycle calls