You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by Francesco Chicchiriccò <il...@apache.org> on 2013/01/25 16:55:02 UTC
Re: svn commit: r1438558 - in /syncope/trunk: client/src/main/java/org/apache/syncope/client/services/proxy/
common/src/main/java/org/apache/syncope/common/services/ common/src/main/java/org/apache/syncope/common/to/
console/src/main/java/org/apache/syncop...
Hi Christian,
could you please explain the rationale of the modifications below - e.g.
why previous
userRequestService.create()
userRequestService.update()
userRequestService.delete()
all become
userRequestService.create()
?
I find this quite confusing...
Regards.
On 25/01/2013 16:43, cschneider@apache.org wrote:
> Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserRequestTestITCase.java
> URL:http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserRequestTestITCase.java?rev=1438558&r1=1438557&r2=1438558&view=diff
> ==============================================================================
> --- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserRequestTestITCase.java (original)
> +++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserRequestTestITCase.java Fri Jan 25 15:43:19 2013
> @@ -69,7 +69,7 @@ public class UserRequestTestITCase exten
> // 2. get unauthorized when trying to request user create
> SyncopeClientException exception = null;
> try {
> - userRequestService.create(userTO);
> + userRequestService.create(new UserRequestTO(userTO));
> fail();
> } catch (SyncopeClientCompositeErrorException e) {
> exception = e.getException(SyncopeClientExceptionType.UnauthorizedRole);
> @@ -122,7 +122,7 @@ public class UserRequestTestITCase exten
> // 2. try to request user update as admin: failure
> SyncopeClientException exception = null;
> try {
> - userRequestService.update(userMod);
> + userRequestService.create(new UserRequestTO(userMod));
> fail();
> } catch (SyncopeClientCompositeErrorException e) {
> exception = e.getException(SyncopeClientExceptionType.UnauthorizedRole);
> @@ -135,7 +135,7 @@ public class UserRequestTestITCase exten
> // 4. update with same password: not matching password policy
> exception = null;
> try {
> - userRequestService.update(userMod);
> + userRequestService.create(new UserRequestTO(userMod));
> } catch (SyncopeClientCompositeErrorException scce) {
> exception = scce.getException(SyncopeClientExceptionType.InvalidSyncopeUser);
> }
> @@ -143,8 +143,8 @@ public class UserRequestTestITCase exten
>
> // 5. now request user update works
> userMod.setPassword("new" + initialPassword);
> - UserRequestTO request = userRequestService.update(userMod);
> - assertNotNull(request);
> + Response response = userRequestService.create(new UserRequestTO(userMod));
> + assertEquals(org.apache.http.HttpStatus.SC_CREATED, response.getStatus());
>
> // 6. switch back to admin
> super.resetRestTemplate();
> @@ -174,8 +174,7 @@ public class UserRequestTestITCase exten
> // 2. try to request user delete as admin: failure
> SyncopeClientException exception = null;
> try {
> -
> - userRequestService.delete(userTO.getId());
> + userRequestService.create(new UserRequestTO(userTO.getId()));
> fail();
> } catch (SyncopeClientCompositeErrorException e) {
> exception = e.getException(SyncopeClientExceptionType.UnauthorizedRole);
> @@ -186,8 +185,8 @@ public class UserRequestTestITCase exten
> super.setupRestTemplate(userTO.getUsername(), initialPassword);
>
> // 4. now request user delete works
> - UserRequestTO request = userRequestService.delete(userTO.getId());
> - assertNotNull(request);
> + Response response = userRequestService.create(new UserRequestTO(userTO.getId()));
> + assertEquals(org.apache.http.HttpStatus.SC_CREATED, response.getStatus());
>
> // 5. switch back to admin
> super.resetRestTemplate();
--
Francesco Chicchiriccò
ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/
Revision 1438558 broke completely the admin console authentication
Posted by Francesco Chicchiriccò <il...@apache.org>.
Hi all,
I was working on the admin console, saw the commit of revision 1438558,
updated and... completely locked out.
When starting the admin console via mvn -Pdev I have in the logs a long
stacktrace ending with:
Caused by: java.lang.NullPointerException: null
at
org.apache.syncope.client.services.proxy.UserRequestServiceProxy.getOptions(UserRequestServiceProxy.java:41)
As a natural consequence, *all* Selenium tests are failing.
I am currently trying to understand what's happened and how to fix it
quickly, since it is completely *blocking*.
Once again, please take care with your commits and check if you aren't
breaking anything *before* committing.
Regards.
--
Francesco Chicchiriccò
ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/