Skip to content

Commit

Permalink
delete print error and add error message if namespace not created
Browse files Browse the repository at this point in the history
  • Loading branch information
jamyct committed Dec 12, 2024
1 parent c384093 commit 4ee9956
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions test/apis/v1alpha1/api_validation_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ var _ = Describe("Test networking v1alpha1 API validation", func() {
By(fmt.Sprintf("expecting denial of CREATE API %s", name))
var err = hubClient.Create(ctx, multiClusterServiceName)
var statusErr *k8serrors.StatusError
fmt.Print(err)
Expect(errors.As(err, &statusErr)).To(BeTrue(), fmt.Sprintf("Create API call produced error %s. Error type wanted is %s.", reflect.TypeOf(err), reflect.TypeOf(&k8serrors.StatusError{})))
Expect(statusErr.Status().Message).Should(ContainSubstring("metadata.name max length is 63"))
})
Expand Down Expand Up @@ -222,8 +221,6 @@ var _ = Describe("Test networking v1alpha1 API validation", func() {
}
By(fmt.Sprintf("expecting denial of CREATE API %s", name))
var err = hubClient.Create(ctx, serviceExportName)
fmt.Println("Print test")
fmt.Println(err)
var statusErr *k8serrors.StatusError
Expect(errors.As(err, &statusErr)).To(BeTrue(), fmt.Sprintf("Create API call produced error %s. Error type wanted is %s.", reflect.TypeOf(err), reflect.TypeOf(&k8serrors.StatusError{})))
Expect(statusErr.Status().Message).Should(ContainSubstring("metadata.name max length is 63"))
Expand Down
2 changes: 1 addition & 1 deletion test/apis/v1alpha1/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ var _ = BeforeSuite(func() {
Name: "testnamespace",
},
}
Expect(hubClient.Create(ctx, &ns)).Should(Succeed())
Expect(hubClient.Create(ctx, &ns)).Should(Succeed(), "failed to delete namespace")

go func() {
defer GinkgoRecover()
Expand Down

0 comments on commit 4ee9956

Please sign in to comment.