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

        Mark Adamcin created issue -
        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.
        Mark Adamcin made changes -
        Field Original Value New Value
        Attachment madamcin_added_test_server_username_and_test_server_password_properties.patch [ 12514191 ]
        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.
        Bertrand Delacretaz made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        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
        Carsten Ziegeler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Gavin made changes -
        Workflow no-reopen-closed,doc-test-required [ 12652933 ] Copy of no-reopen-closed,doc-test-required [ 12765244 ]
        Gavin made changes -
        Workflow Copy of no-reopen-closed,doc-test-required [ 12765244 ] no-reopen-closed,doc-test-required [ 12767984 ]
        Gavin made changes -
        Workflow no-reopen-closed,doc-test-required [ 12767984 ] re-open possible,doc-test-required [ 12790100 ]
        Gavin made changes -
        Workflow re-open possible,doc-test-required [ 12790100 ] no-reopen-closed,doc-test-required [ 12792475 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        370d 8h 52m 1 Bertrand Delacretaz 15/Feb/13 11:02
        Resolved Resolved Closed Closed
        3d 2h 39m 1 Carsten Ziegeler 18/Feb/13 13:41

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development