Sling
  1. Sling
  2. SLING-2419

SlingTestBase, SlingRemoteTestRunner, and SlingRemoteExecutionRule should support the ability to use non-default credentials

    Details

      Description

      For those who have gotten to the point of using the sling junit framework on an IT administered CQ5 development server, the fact that default admin credentials are hardcoded throughout the testing modules will present an inconvenient problem.

        Activity

        Hide
        Mark Adamcin added a comment -

        I added support for "test.server.username" and "test.server.password" properties to the SlingTestBase and SlingRemoteTestRunner classes for specifying a non-default set of credentials for server readiness checking and for remote execution of sling junit tests. I also added constructor overloads to several classes to accept a username and password as arguments, and added getters to SlingTestBase to expose those values to integration tests for use in other HTTP requests. Finally, for the sake of completeness, I updated the sample integration test pom to demonstrate the use of these properties.

        Show
        Mark Adamcin added a comment - I added support for "test.server.username" and "test.server.password" properties to the SlingTestBase and SlingRemoteTestRunner classes for specifying a non-default set of credentials for server readiness checking and for remote execution of sling junit tests. I also added constructor overloads to several classes to accept a username and password as arguments, and added getters to SlingTestBase to expose those values to integration tests for use in other HTTP requests. Finally, for the sake of completeness, I updated the sample integration test pom to demonstrate the use of these properties.
        Hide
        Bertrand Delacretaz added a comment -

        I have now applied your patch in revision 1446510 - please cross-check.

        Show
        Bertrand Delacretaz added a comment - I have now applied your patch in revision 1446510 - please cross-check.
        Hide
        Mark Adamcin added a comment -

        Thanks, Bertrand! I just built the testing bundles from the trunk, replaced my locally patched versions of them in an existing project with the trunk versions, and ran the integration tests once as admin:admin (succeeds), once as admin:shouldfail (fails), and once as a non-admin user (succeeds). Everything works as expected.

        Any chance of a 1.0.8 release soon?

        Show
        Mark Adamcin added a comment - Thanks, Bertrand! I just built the testing bundles from the trunk, replaced my locally patched versions of them in an existing project with the trunk versions, and ran the integration tests once as admin:admin (succeeds), once as admin:shouldfail (fails), and once as a non-admin user (succeeds). Everything works as expected. Any chance of a 1.0.8 release soon?
        Hide
        Carsten Ziegeler added a comment -

        I've started the vote on Friday, so these should be available Monday or Tuesday

        Show
        Carsten Ziegeler added a comment - I've started the vote on Friday, so these should be available Monday or Tuesday

          People

          • Assignee:
            Unassigned
            Reporter:
            Mark Adamcin
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development