GitHub user neykov opened a pull request:

    https://github.com/apache/brooklyn-server/pull/434

    More brooklyn-server integration tests fixes

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/neykov/brooklyn-server fix/integration-tests

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-server/pull/434.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #434
    
----
commit cd07d8161ae4688900b824a449760986806c814f
Author: Svetoslav Neykov <[email protected]>
Date:   2016-11-14T10:08:39Z

    Initialize REST API security correctly for integration tests
    
    Also add checks for it in the tests.
    
    Tests had different behaviour depending on whether brooklyn-ui existed 
along brooklyn-server on disk. When brooklyn-ui was there tests would find it 
and use the web app code from there, including the web.xml which restricts 
requests to only authorized users. When brooklyn-ui is missing though a default 
web app without web.xml was being created. This would result in non-authorized 
requests succeeding.  In this case requests including the authorization header 
would be accepted and rejected if the password is invalid. But in order to 
include the authorization header the server must first respond with a 401 which 
didn't happen. Moving web-security.xml to rest-server allows us to force 
request authentication for tests even if there's no web.xml in the web app.
    Should be fine moving web-security.xml to rest-server (which is only used 
in classic) because it's only inserted by classic related code. Karaf Brooklyn 
doesn't have control over the web apps.

commit de0af81a09aeec28d9b6dcef498299fd379c095c
Author: Svetoslav Neykov <[email protected]>
Date:   2016-11-14T10:09:57Z

    Don't cache the delegatinProvider in a static field as that's causing test 
failures (when reloading properties with a different security provider). 
DelegatingSecurityProvider caches the delegate in mgmt so re-creating it for 
the same mgmt is cheap.

commit 113f53b01804b2a9e08f5135dfb7887605257446
Author: Svetoslav Neykov <[email protected]>
Date:   2016-11-14T10:10:52Z

    Non-HOT HA modes don't allow app-related requests in any more.

commit 819f7252ffbb394036da169fe48aac8205ae7fc5
Author: Svetoslav Neykov <[email protected]>
Date:   2016-11-14T11:54:29Z

    Clean up BrooklynJacksonSerializerIntegrationTest and mark test as Broken

commit bfdf522c452df262b3b4bb55cd567ddf45b31fa7
Author: Svetoslav Neykov <[email protected]>
Date:   2016-11-14T12:43:28Z

    Don't lose the security provider configured in tests on reload

commit 23117fce983b1be6f53434da93bd31bbf3b61c04
Author: Svetoslav Neykov <[email protected]>
Date:   2016-11-14T13:42:48Z

    Minor integration test fixes
    
    * Request the correct "skipSecurity" mode
    * Platform independent ssh result test
    * Upgrade surefire to latest available

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to