Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-37801

ViewCredentialsActionTest#smokes and CredentialsStoreActionTest are failing

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      What incorrect behavior happened?

      ViewCredentialsActionTest is failing against the stable-2.7 branch

      Expected: Expected number of attributes '0' but was '1' - comparing <userFacingAction...> at /userFacingAction[1] to <userFacingAction...> at /userFacingAction[1]:
      <userFacingAction>
        <domains>
          <_>
            <description>Credentials that should be available irrespective of domain specification to requirements matching.</description>
            <displayName>Global credentials (unrestricted)</displayName>
            <fullDisplayName>System » Global credentials (unrestricted)</fullDisplayName>
            <fullName>system/_</fullName>
            <global>true</global>
            <urlName>_</urlName>
          </_>
        </domains>
      </userFacingAction>
           but: result was: 
      <userFacingAction _class="com.cloudbees.plugins.credentials.SystemCredentialsProvider$UserFacingAction">
        <domains>
          <_ _class="com.cloudbees.plugins.credentials.CredentialsStoreAction$DomainWrapper">
            <description>Credentials that should be available irrespective of domain specification to requirements matching.</description>
            <displayName>Global credentials (unrestricted)</displayName>
            <fullDisplayName>System » Global credentials (unrestricted)</fullDisplayName>
            <fullName>system/_</fullName>
            <global>true</global>
            <urlName>_</urlName>
          </_>
        </domains>
      </userFacingAction>
      

      ViewCredentialsActionTest failing against stable-2.7

      Expected: is "<rootActionImpl><stores><system><domains><_><description>Credentials that should be available irrespective of domain specification to requirements matching.</description><displayName>Global credentials (unrestricted)</displayName><fullDisplayName>System » Global credentials (unrestricted)</fullDisplayName><fullName>system/_</fullName><global>true</global><urlName>_</urlName></_></domains></system></stores></rootActionImpl>"
           but: was "<rootActionImpl _class='com.cloudbees.plugins.credentials.ViewCredentialsAction$RootActionImpl'><stores><system _class='com.cloudbees.plugins.credentials.SystemCredentialsProvider$UserFacingAction'><domains><_ _class='com.cloudbees.plugins.credentials.CredentialsStoreAction$DomainWrapper'><description>Credentials that should be available irrespective of domain specification to requirements matching.</description><displayName>Global credentials (unrestricted)</displayName><fullDisplayName>System » Global credentials (unrestricted)</fullDisplayName><fullName>system/_</fullName><global>true</global><urlName>_</urlName></_></domains></system></stores></rootActionImpl>"
      

      The problem seems not to be a real bug but some minor xml changes in new Jenkins version that broke the test. Some _class attributes added that IMHO can be safely ignored by this test

      Environment

      • O.S.: Linux
      • Jenkins version: stable-2.7

      What was the expected outcome?

      All credentials test passes

      Step by step to reproduce it

      mvn clean install -Djava.level=8
      mvn test -Djava.level=8 -Djenkins.version=2.7.2
      

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Raul
            Path:
            src/test/java/com/cloudbees/plugins/credentials/XmlMatchers.java
            http://jenkins-ci.org/commit/credentials-plugin/2e8ea264f4e04d731a784286149a9ecc61b29985
            Log:
            JENKINS-37801 New Matcher that ignores "private" attributes

            • The ones starting with "_"
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Raul Path: src/test/java/com/cloudbees/plugins/credentials/XmlMatchers.java http://jenkins-ci.org/commit/credentials-plugin/2e8ea264f4e04d731a784286149a9ecc61b29985 Log: JENKINS-37801 New Matcher that ignores "private" attributes The ones starting with "_"
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Raul
            Path:
            src/test/java/com/cloudbees/plugins/credentials/CredentialsStoreActionTest.java
            http://jenkins-ci.org/commit/credentials-plugin/b12bd48173ac8871e438d9aaaab5cca2cde6135f
            Log:
            JENKINS-37801 Use the new Matcher in CredentialsStoreActionTest

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Raul Path: src/test/java/com/cloudbees/plugins/credentials/CredentialsStoreActionTest.java http://jenkins-ci.org/commit/credentials-plugin/b12bd48173ac8871e438d9aaaab5cca2cde6135f Log: JENKINS-37801 Use the new Matcher in CredentialsStoreActionTest
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Raul
            Path:
            src/test/java/com/cloudbees/plugins/credentials/ViewCredentialsActionTest.java
            http://jenkins-ci.org/commit/credentials-plugin/914b3a005df5696d80a8963ee2d3acf367ec6ea9
            Log:
            JENKINS-37801 Use the new Matcher in ViewCredentialsActionTest

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Raul Path: src/test/java/com/cloudbees/plugins/credentials/ViewCredentialsActionTest.java http://jenkins-ci.org/commit/credentials-plugin/914b3a005df5696d80a8963ee2d3acf367ec6ea9 Log: JENKINS-37801 Use the new Matcher in ViewCredentialsActionTest
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            src/test/java/com/cloudbees/plugins/credentials/CredentialsStoreActionTest.java
            src/test/java/com/cloudbees/plugins/credentials/ViewCredentialsActionTest.java
            src/test/java/com/cloudbees/plugins/credentials/XmlMatchers.java
            http://jenkins-ci.org/commit/credentials-plugin/e0d05e2103b9518588757b83543833f4c87465a1
            Log:
            Merge pull request #66 from raul-arabaolaza/JENKINS-37801

            JENKINS-37801 ViewCredentialsActionTest#smokes and CredentialsStoreActionTest are failing against stable-2.7

            Compare: https://github.com/jenkinsci/credentials-plugin/compare/ad9ba7f30ffe...e0d05e2103b9

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/test/java/com/cloudbees/plugins/credentials/CredentialsStoreActionTest.java src/test/java/com/cloudbees/plugins/credentials/ViewCredentialsActionTest.java src/test/java/com/cloudbees/plugins/credentials/XmlMatchers.java http://jenkins-ci.org/commit/credentials-plugin/e0d05e2103b9518588757b83543833f4c87465a1 Log: Merge pull request #66 from raul-arabaolaza/ JENKINS-37801 JENKINS-37801 ViewCredentialsActionTest#smokes and CredentialsStoreActionTest are failing against stable-2.7 Compare: https://github.com/jenkinsci/credentials-plugin/compare/ad9ba7f30ffe...e0d05e2103b9

              People

              Assignee:
              rarabaolaza Raul Arabaolaza
              Reporter:
              rarabaolaza Raul Arabaolaza
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: