Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-19471

Failing unit tests in microprofile-jwt quickstart

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 7.3.1.CR2, 7.3.1.GA
    • EAP-XP-1.0.0.GA-CR1
    • Quickstarts
    • None

      When running tests from microprofile-jwt quickstart they all fail:

      [ERROR]   JWTClientIT.testAuthenticated:112 Successful call expected:<200> but was:<404>
      [ERROR]   JWTClientIT.testAuthorizationRequired:124 Authorization required expected:<403> but was:<404>
      [ERROR]   JWTClientIT.testAuthorized:138 Successful call expected:<200> but was:<404>
      [ERROR]   JWTClientIT.testClaimAccess:168 Successful call expected:<200> but was:<404>
      [ERROR]   JWTClientIT.testHelloWorld:96 Successful call expected:<200> but was:<404>
      [ERROR]   JWTClientIT.testMissingRole:154 Authorization Required expected:<403> but was:<404>
      

      This is caused by unnecessary slash in path:

      index 933f636..2134ba8 100644
      --- a/microprofile-jwt/src/test/java/org/wildfly/quickstarts/mpjwt/JWTClientIT.java
      +++ b/microprofile-jwt/src/test/java/org/wildfly/quickstarts/mpjwt/JWTClientIT.java
      @@ -52,7 +52,7 @@ import org.junit.runner.RunWith;
       @RunAsClient
       public class JWTClientIT {
       
      -    private static final String ROOT_PATH = "/rest/Sample/";
      +    private static final String ROOT_PATH = "rest/Sample/";
           private static final String HELLO_WORLD = "helloworld";
      

              darran.lofthouse@redhat.com Darran Lofthouse
              jkasik@redhat.com Jan Kašík
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: