Skip to content

Commit

Permalink
Merge branch 'mainline' into personal/rreynolds/add-prod-eu-url
Browse files Browse the repository at this point in the history
  • Loading branch information
ronreynolds committed Aug 10, 2024
2 parents 3398041 + 73034a6 commit 9f79751
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/test/java/com/smartsheet/api/logging/LoggingIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,9 @@ void testConsoleLogging() {
String output = traceStream.toString();
// not super-robust but asserts some of the important parts
assertThat(output)
.contains("request:{")
// truncated Auth header
.contains("Authorization':'Bearer ****null")
.contains("response:{")
.contains("status:'HTTP/1.1 401 Unauthorized',")
.contains("\"errorCode\" : 1002,")
.contains("\"message\" : \"Your Access Token is invalid.\"");
.contains("request:{").contains("Authorization':'Bearer ****null")
.contains("response:{").contains("status:'HTTP/1.1 401 Unauthorized'")
;
}

@Test
Expand All @@ -70,10 +66,8 @@ void testCustomLogging() {
String output = traceStream.toString();
// not super-robust but asserts some of the important parts
assertThat(output)
.contains("request:{")
.contains("'Authorization':'Bearer ****oken")
.contains("response:{")
.contains("body:'{\n \"errorCode\" : 1002,\n \"message\" : \"Your Access Token is invalid.\",\n \"refId\" :")
.contains("status:'HTTP/1.1 401 Unauthorized'");
.contains("request:{").contains("'Authorization':'Bearer ****oken")
.contains("response:{").contains("status:'HTTP/1.1 401 Unauthorized'")
;
}
}

0 comments on commit 9f79751

Please sign in to comment.