This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
     new 3ece85c  Update test for changes in Base64 decoder
3ece85c is described below

commit 3ece85cc63ece4dde1ec526f32d6362d165599da
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Aug 1 23:37:59 2019 +0100

    Update test for changes in Base64 decoder
---
 test/org/apache/catalina/authenticator/TestBasicAuthParser.java | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/test/org/apache/catalina/authenticator/TestBasicAuthParser.java 
b/test/org/apache/catalina/authenticator/TestBasicAuthParser.java
index 4be4923..627a59a 100644
--- a/test/org/apache/catalina/authenticator/TestBasicAuthParser.java
+++ b/test/org/apache/catalina/authenticator/TestBasicAuthParser.java
@@ -387,18 +387,17 @@ public class TestBasicAuthParser {
     /*
      * "-" is not a legal base64 character. The RFC says it must be
      * ignored by the decoder. This will scramble the decoded string
-     * and eventually result in an authentication Assert.failure.
+     * and eventually result in an IllegalArgumentException.
      */
-    @Test
+    @Test(expected = IllegalArgumentException.class)
     public void testBadBase64Char() throws Exception {
         final String BASE64_CRIB = "dXNlcmlkOnNl-3JldHM=";
         final BasicAuthHeader AUTH_HEADER =
                 new BasicAuthHeader(NICE_METHOD, BASE64_CRIB);
+        @SuppressWarnings("unused")
         BasicAuthenticator.BasicCredentials credentials =
                 new BasicAuthenticator.BasicCredentials(
                     AUTH_HEADER.getHeader(), StandardCharsets.UTF_8, true);
-        Assert.assertEquals(USER_NAME, credentials.getUsername());
-        Assert.assertNotSame(PASSWORD, credentials.getPassword());
     }
 
     /*


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to