Skip to content

Commit

Permalink
Restore logspec after CheckLogspecOperations
Browse files Browse the repository at this point in the history
Noticed debug level logging was on for a test when it should not have
been.

Change-Id: I0f38614917be3868712b8b53899e8b1bbba1cb03
Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
  • Loading branch information
sykesm authored and Brett Logan committed Apr 15, 2020
1 parent fe2ca47 commit 3507335
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions integration/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,7 @@ func CheckLogspecOperations(client *http.Client, logspecURL string) {
resp, err = client.Do(updateReq)
Expect(err).NotTo(HaveOccurred())
Expect(resp.StatusCode).To(Equal(http.StatusNoContent))
resp.Body.Close()

resp, err = client.Get(logspecURL)
Expect(err).NotTo(HaveOccurred())
Expand All @@ -823,6 +824,14 @@ func CheckLogspecOperations(client *http.Client, logspecURL string) {
resp.Body.Close()
Expect(err).NotTo(HaveOccurred())
Expect(string(bodyBytes)).To(MatchJSON(`{"spec":"debug"}`))

By("resetting the logspec")
updateReq, err = http.NewRequest(http.MethodPut, logspecURL, strings.NewReader(`{"spec":"info"}`))
Expect(err).NotTo(HaveOccurred())
resp, err = client.Do(updateReq)
Expect(err).NotTo(HaveOccurred())
Expect(resp.StatusCode).To(Equal(http.StatusNoContent))
resp.Body.Close()
}

func CheckHealthEndpoint(client *http.Client, url string) {
Expand Down

0 comments on commit 3507335

Please sign in to comment.