Skip to content

Commit

Permalink
test http code
Browse files Browse the repository at this point in the history
  • Loading branch information
parametalol committed Feb 16, 2024
1 parent d214d0b commit 857e30d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion e2e/e2e_central_traits_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package e2e

import (
"context"
"net/http"
"os"
"time"

Expand Down Expand Up @@ -82,8 +83,11 @@ var _ = Describe("central traits", Ordered, func() {
_, err = adminAPI.GetCentralTrait(ctx, id, "test-trait")
Expect(err).ToNot(HaveOccurred(), "no error on checking for existing trait")

_, err = adminAPI.GetCentralTrait(ctx, id, "test-trait-2")
resp, err := adminAPI.GetCentralTrait(ctx, id, "test-trait-2")
Expect(err).To(HaveOccurred(), "error on checking for non-existing trait")
if Expect(resp).NotTo(BeNil()) {
Expect(resp.StatusCode == http.StatusNotFound).To(BeTrue())
}

_, err = adminAPI.DeleteCentralTrait(ctx, id, "test-trait")
Expect(err).ToNot(HaveOccurred(), "no error on deleting test-trait")
Expand Down

0 comments on commit 857e30d

Please sign in to comment.