java/code/src/com/redhat/rhn/frontend/security/test/AuthenticationServiceAbstractTestCase.java
| 3 ++
java/code/src/com/redhat/rhn/frontend/security/test/PxtAuthenticationServiceTest.java
| 14 +++-------
java/spacewalk-java.spec
| 8 +++++
rel-eng/packages/spacewalk-java
| 2 -
4 files changed, 16 insertions(+), 11 deletions(-)
New commits:
commit d8a762afedf9553984de9a98a35c30c5ba2e15d8
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri Jan 10 14:45:56 2014 +0100
Automatic commit of package [spacewalk-java] release [2.1.113-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 83cc44b..7a5286d 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -28,7 +28,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 2.1.112
+Version: 2.1.113
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -795,6 +795,12 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Fri Jan 10 2014 Tomas Lestach <tlestach(a)redhat.com> 2.1.113-1
+- fix PxtAuthenticationServiceTest
+- Protected field in final class makes no sense
+- Avoiding instantiating Boolean objects
+- Eliminate unused private fields
+
* Fri Jan 10 2014 Tomas Lestach <tlestach(a)redhat.com> 2.1.112-1
- 1013712 - return server action message within schedule.listInProgressSystems
and schedule.listCompletedSystems API calls
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 601c093..516fee2 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-2.1.112-1 java/
+2.1.113-1 java/
commit ed14db4ae1e42bd74c087ac437e41c1dc723902a
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Jan 9 17:28:22 2014 +0100
fix PxtAuthenticationServiceTest
diff --git
a/java/code/src/com/redhat/rhn/frontend/security/test/AuthenticationServiceAbstractTestCase.java
b/java/code/src/com/redhat/rhn/frontend/security/test/AuthenticationServiceAbstractTestCase.java
index a28da2f..1d1a459 100644
---
a/java/code/src/com/redhat/rhn/frontend/security/test/AuthenticationServiceAbstractTestCase.java
+++
b/java/code/src/com/redhat/rhn/frontend/security/test/AuthenticationServiceAbstractTestCase.java
@@ -128,6 +128,9 @@ public abstract class AuthenticationServiceAbstractTestCase extends
MockObjectTe
mockRequest.stubs().method("getMethod")
.will(returnValue(new String("POST")));
+ mockRequest.stubs().method("getSession")
+ .will(returnValue(null));
+
mockRequest.stubs().method("setAttribute");
}
diff --git
a/java/code/src/com/redhat/rhn/frontend/security/test/PxtAuthenticationServiceTest.java
b/java/code/src/com/redhat/rhn/frontend/security/test/PxtAuthenticationServiceTest.java
index 1f20672..b99a1ce 100644
---
a/java/code/src/com/redhat/rhn/frontend/security/test/PxtAuthenticationServiceTest.java
+++
b/java/code/src/com/redhat/rhn/frontend/security/test/PxtAuthenticationServiceTest.java
@@ -122,16 +122,13 @@ public class PxtAuthenticationServiceTest extends
AuthenticationServiceAbstractT
}
private void runRedirectToLoginTest() throws Exception {
-
mockRequest.expects(atLeastOnce()).method("getRequestDispatcher").will(
- returnValue(mockDispatcher.proxy()));
-
service.redirectToLogin(getRequest(), getResponse());
}
protected void setUpRedirectToLogin() {
super.setUpRedirectToLogin();
- mockDispatcher.stubs().method("forward").withAnyArguments();
+ mockResponse.stubs().method("sendRedirect").will(returnValue(null));
}
/**
@@ -140,9 +137,8 @@ public class PxtAuthenticationServiceTest extends
AuthenticationServiceAbstractT
public final void testRedirectoToLoginForwardsRequest() throws Exception {
setUpRedirectToLogin();
- mockDispatcher.expects(once()).method("forward").with(
- new Constraint[] {eq(getRequest()),
- eq(mockResponse.proxy())});
+ mockResponse.expects(once()).method("sendRedirect").with(
+ new Constraint[]
{eq("/rhn/Login.do")}).will(returnValue(null));
mockRequest.stubs().method("getParameterNames").will(
returnValue(new Vector().elements()));
@@ -162,8 +158,8 @@ public class PxtAuthenticationServiceTest extends
AuthenticationServiceAbstractT
String redirectUri = createRequestURIWithParams(requestParamNames,
requestParamValues);
- mockRequest.expects(atLeastOnce()).method("setAttribute").with(
- new Constraint[] {eq("url_bounce"), eq(redirectUri)});
+ mockResponse.expects(once()).method("sendRedirect").with(
+ new Constraint[]
{eq("/rhn/Login.do")}).will(returnValue(null));
runRedirectToLoginTest();
}