diff --git a/logbook-api/src/test/java/org/zalando/logbook/HeaderObfuscatorTest.java b/logbook-api/src/test/java/org/zalando/logbook/HeaderObfuscatorTest.java index f591bd503..52ea4784f 100644 --- a/logbook-api/src/test/java/org/zalando/logbook/HeaderObfuscatorTest.java +++ b/logbook-api/src/test/java/org/zalando/logbook/HeaderObfuscatorTest.java @@ -36,26 +36,4 @@ public void noneShouldDefaultToNoOp() { is(equalTo("Bearer c61a8f84-6834-11e5-a607-10ddb1ee7671"))); } - // TODO migrate! -// @Test -// public void compoundShouldObfuscateMultipleTimes() { -// final HeaderObfuscator unit = HeaderObfuscator.compound( -// (key, value) -> "XXX".equals(value) ? "YYY" : value, -// (key, value) -> "Authorization".equalsIgnoreCase(key) ? "XXX" : value); -// -// assertThat(unit.obfuscate("Authorization", "Bearer c61a8f84-6834-11e5-a607-10ddb1ee7671"), -// is(equalTo("YYY"))); -// } -// -// @Test -// public void compoundShouldObfuscateOnlyMatchingEntries() { -// final HeaderObfuscator unit = HeaderObfuscator.compound( -// (key, value) -> "XXX".equals(value) ? "YYY" : value, -// (key, value) -> "password".equals(key) ? "" : value, // this won't be used -// (key, value) -> "Authorization".equalsIgnoreCase(key) ? "XXX" : value); -// -// assertThat(unit.obfuscate("Authorization", "Bearer c61a8f84-6834-11e5-a607-10ddb1ee7671"), -// is(equalTo("YYY"))); -// } - } \ No newline at end of file diff --git a/logbook-api/src/test/java/org/zalando/logbook/QueryObfuscatorTest.java b/logbook-api/src/test/java/org/zalando/logbook/QueryObfuscatorTest.java index 0ab67b827..a33d98e38 100644 --- a/logbook-api/src/test/java/org/zalando/logbook/QueryObfuscatorTest.java +++ b/logbook-api/src/test/java/org/zalando/logbook/QueryObfuscatorTest.java @@ -35,14 +35,4 @@ public void noneShouldDefaultToNoOp() { assertThat(unit.obfuscate("a=b&c=d&f=e"), is(equalTo("a=b&c=d&f=e"))); } - // TODO migrate -// @Test -// public void compoundShouldObfuscateMultipleTimes() { -// final QueryObfuscator unit = QueryObfuscator.compound( -// query -> query.replace("secure", "XXX"), -// query -> query.replace("s3cr3t", "XXX")); -// -// assertThat(unit.obfuscate("password=s3cr3t&access_token=secure"), is("password=XXX&access_token=XXX")); -// } - } \ No newline at end of file diff --git a/logbook-core/src/main/java/org/zalando/logbook/DefaultLogbookFactory.java b/logbook-core/src/main/java/org/zalando/logbook/DefaultLogbookFactory.java index ffae542fc..916e911f5 100644 --- a/logbook-core/src/main/java/org/zalando/logbook/DefaultLogbookFactory.java +++ b/logbook-core/src/main/java/org/zalando/logbook/DefaultLogbookFactory.java @@ -42,7 +42,7 @@ public Logbook create( @Nullable final HttpLogWriter writer) { - final HeaderObfuscator header = firstNonNull(headerObfuscator, authorization()); // TODO test default + final HeaderObfuscator header = firstNonNull(headerObfuscator, authorization()); final BodyObfuscator body = firstNonNull(bodyObfuscator, BodyObfuscator.none()); return new DefaultLogbook( @@ -61,7 +61,7 @@ private RequestObfuscator combine( final BodyObfuscator bodyObfuscator, @Nullable final RequestObfuscator requestObfuscator) { - final QueryObfuscator query = firstNonNull(queryObfuscator, accessToken()); // TODO test default + final QueryObfuscator query = firstNonNull(queryObfuscator, accessToken()); return RequestObfuscator.merge( firstNonNull(requestObfuscator, RequestObfuscator.none()),