@@ -23,7 +23,6 @@ import (
23
23
"time"
24
24
25
25
v1 "k8s.io/api/core/v1"
26
- "k8s.io/apimachinery/pkg/api/errors"
27
26
apierrors "k8s.io/apimachinery/pkg/api/errors"
28
27
"k8s.io/apimachinery/pkg/api/resource"
29
28
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -261,7 +260,7 @@ func createNamespace(t *testing.T, testCtx *testContext, ns string) {
261
260
func createAppGroups (ctx context.Context , client agversioned.Interface , appGroups []* agv1alpha1.AppGroup ) error {
262
261
for _ , ag := range appGroups {
263
262
_ , err := client .AppgroupV1alpha1 ().AppGroups (ag .Namespace ).Create (ctx , ag , metav1.CreateOptions {})
264
- if err != nil && ! errors .IsAlreadyExists (err ) {
263
+ if err != nil && ! apierrors .IsAlreadyExists (err ) {
265
264
return err
266
265
}
267
266
}
@@ -277,7 +276,7 @@ func cleanupAppGroups(ctx context.Context, client agversioned.Interface, appGrou
277
276
func createNetworkTopologies (ctx context.Context , client ntversioned.Interface , networkTopologies []* ntv1alpha1.NetworkTopology ) error {
278
277
for _ , nt := range networkTopologies {
279
278
_ , err := client .NetworktopologyV1alpha1 ().NetworkTopologies (nt .Namespace ).Create (ctx , nt , metav1.CreateOptions {})
280
- if err != nil && ! errors .IsAlreadyExists (err ) {
279
+ if err != nil && ! apierrors .IsAlreadyExists (err ) {
281
280
return err
282
281
}
283
282
}
0 commit comments