Skip to content

Commit

Permalink
chore: remove redundant import
Browse files Browse the repository at this point in the history
Signed-off-by: Kumar Mallikarjuna <[email protected]>
  • Loading branch information
kumar-mallikarjuna authored and porridge committed Jul 5, 2024
1 parent 0a66a34 commit e7f1165
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/test/case.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
corev1 "k8s.io/api/core/v1"
eventsv1 "k8s.io/api/events/v1"
eventsbeta1 "k8s.io/api/events/v1beta1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
Expand Down Expand Up @@ -350,7 +349,7 @@ func (t *Case) Run(test *testing.T, ts *report.Testsuite) {
}

for kc, c := range clients {
if err = t.CreateNamespace(test, c, ns); apierrors.IsAlreadyExists(err) {
if err = t.CreateNamespace(test, c, ns); k8serrors.IsAlreadyExists(err) {
t.Logger.Logf("namespace %q already exists, using kubeconfig %q", ns.Name, kc)
} else if err != nil {
setupReport.Failure = report.NewFailure("failed to create test namespace", []error{err})
Expand Down Expand Up @@ -381,7 +380,7 @@ func (t *Case) Run(test *testing.T, ts *report.Testsuite) {
cl, err = testStep.Client(false)
if err != nil {
errs = append(errs, fmt.Errorf("failed to lazy-load kubeconfig: %w", err))
} else if err = t.CreateNamespace(test, cl, ns); apierrors.IsAlreadyExists(err) {
} else if err = t.CreateNamespace(test, cl, ns); k8serrors.IsAlreadyExists(err) {
t.Logger.Logf("namespace %q already exists", ns.Name)
} else if err != nil {
errs = append(errs, fmt.Errorf("failed to create test namespace: %w", err))
Expand Down

0 comments on commit e7f1165

Please sign in to comment.