3 commits - backend/apache-conf backend/spacewalk-backend.spec rel-eng/packages
by StephenHerr
backend/apache-conf/zz-spacewalk-server-wsgi.conf | 13 +------------
backend/spacewalk-backend.spec | 6 +++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 7 insertions(+), 14 deletions(-)
New commits:
commit 8544f8ecd5d376de6c38f62d47262c0694524c02
Author: Stephen Herr <sherr(a)redhat.com>
Date: Mon Apr 29 13:25:14 2013 -0400
Automatic commit of package [spacewalk-backend] release [1.10.24-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 3ee954b..1931638 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -12,7 +12,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 1.10.23
+Version: 1.10.24
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -637,6 +637,10 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Mon Apr 29 2013 Stephen Herr <sherr(a)redhat.com> 1.10.24-1
+- Revert "Run python backend in daemon mode to ease integration with splice"
+- Revert "Additional change for spacewalk-backend daemon mode"
+
* Fri Apr 26 2013 Michael Mraka <michael.mraka(a)redhat.com> 1.10.23-1
- 911738 - remove incorrect path from db
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index d9beeb1..5af7d8c 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.10.23-1 backend/
+1.10.24-1 backend/
commit 0a7b49f17e5f9531e94c9130b48e8663fc66c91c
Author: Stephen Herr <sherr(a)redhat.com>
Date: Mon Apr 29 13:24:52 2013 -0400
Revert "Run python backend in daemon mode to ease integration with splice"
This reverts commit 17be4a02f3af2d2b6c965358b43e8555de1fb6d0.
diff --git a/backend/apache-conf/zz-spacewalk-server-wsgi.conf b/backend/apache-conf/zz-spacewalk-server-wsgi.conf
index a193368..d025a27 100644
--- a/backend/apache-conf/zz-spacewalk-server-wsgi.conf
+++ b/backend/apache-conf/zz-spacewalk-server-wsgi.conf
@@ -2,17 +2,7 @@
LoadModule wsgi_module modules/mod_wsgi.so
</IfModule>
-###
-# WSGIPythonPath is only available in 'embedded' mode
-###
-#WSGIPythonPath "/usr/share/rhn"
-
-###
-# When running in 'daemon' mode use 'python-path' on WSGIDaemonProcess
-###
-WSGIProcessGroup spacewalk
-WSGIApplicationGroup spacewalk
-WSGIDaemonProcess spacewalk user=apache group=apache display-name=%{GROUP} python-path="/usr/share/rhn"
+WSGIPythonPath "/usr/share/rhn"
WSGIScriptAlias /APP /usr/share/rhn/wsgi/app.py
WSGIScriptAlias /APPLET /usr/share/rhn/wsgi/applet.py
commit 84326f4ac932b2375617c8de29b5e133fdf4fd38
Author: Stephen Herr <sherr(a)redhat.com>
Date: Mon Apr 29 13:24:36 2013 -0400
Revert "Additional change for spacewalk-backend daemon mode"
This reverts commit b8c8ca4e0fcdc8dd3a09579c16c092ee8cf53ce4.
diff --git a/backend/apache-conf/zz-spacewalk-server-wsgi.conf b/backend/apache-conf/zz-spacewalk-server-wsgi.conf
index c2dddc6..a193368 100644
--- a/backend/apache-conf/zz-spacewalk-server-wsgi.conf
+++ b/backend/apache-conf/zz-spacewalk-server-wsgi.conf
@@ -10,7 +10,6 @@
###
# When running in 'daemon' mode use 'python-path' on WSGIDaemonProcess
###
-WSGISocketPrefix run/wsgi
WSGIProcessGroup spacewalk
WSGIApplicationGroup spacewalk
WSGIDaemonProcess spacewalk user=apache group=apache display-name=%{GROUP} python-path="/usr/share/rhn"
11 years, 2 months
Changes to 'refs/tags/spacewalk-schema-1.10.26-1'
by Michael Mraka
Tag 'spacewalk-schema-1.10.26-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2013-04-29 12:20 +0000
Tagging package [spacewalk-schema] version [1.10.26-1] in directory [schema/spacewalk/].
Changes since spacewalk-setup-1.10.8-1:
Michael Mraka (2):
fixed dependency
Automatic commit of package [spacewalk-schema] release [1.10.26-1].
Tomas Lestach (1):
removing unnecessary cast
---
java/code/src/com/redhat/rhn/common/db/datasource/test/DataListTest.java | 2 +-
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/oracle/packages/packages.deps | 1 +
schema/spacewalk/postgres/packages/packages.deps | 1 +
schema/spacewalk/spacewalk-schema.spec | 5 ++++-
5 files changed, 8 insertions(+), 3 deletions(-)
---
11 years, 2 months
2 commits - rel-eng/packages schema/spacewalk
by Michael Mraka
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/oracle/packages/packages.deps | 1 +
schema/spacewalk/postgres/packages/packages.deps | 1 +
schema/spacewalk/spacewalk-schema.spec | 5 ++++-
4 files changed, 7 insertions(+), 2 deletions(-)
New commits:
commit d7cb8a86f0ff847939f21cce63214f6bdd244797
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Apr 29 14:20:59 2013 +0200
Automatic commit of package [spacewalk-schema] release [1.10.26-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 5c26c27..3e4417a 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.10.25-1 schema/spacewalk/
+1.10.26-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index efb3f29..3463893 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -4,7 +4,7 @@ Name: spacewalk-schema
Group: Applications/Internet
Summary: Oracle SQL schema for Spacewalk server
-Version: 1.10.25
+Version: 1.10.26
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -71,6 +71,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Mon Apr 29 2013 Michael Mraka <michael.mraka(a)redhat.com> 1.10.26-1
+- fixed dependency
+
* Tue Apr 16 2013 Stephen Herr <sherr(a)redhat.com> 1.10.25-1
- 952839 - adding erroronfail option for kickstart scripts
- add oracle equivalent source (even empty)
commit 756e015633fb43268a5535fd9ac248c78a0fb923
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Apr 29 14:09:54 2013 +0200
fixed dependency
indroduced by ea6d42861a42750b5ed15fa6f80d797d6ed65b1d
Fixing
Warning: Package Body created with compilation errors.
Errors for PACKAGE BODY RHN_CHANNEL:
7/9 PL/SQL: Item ignored
11/18 PLS-00320: the declaration of the type of this expression is incomplete or malformed
12/17 PL/SQL: SQL Statement ignored
13/25 PL/SQL: ORA-00942: table or view does not exist
diff --git a/schema/spacewalk/oracle/packages/packages.deps b/schema/spacewalk/oracle/packages/packages.deps
index 9d7c56a..189f628 100644
--- a/schema/spacewalk/oracle/packages/packages.deps
+++ b/schema/spacewalk/oracle/packages/packages.deps
@@ -27,6 +27,7 @@ rhn_channel.pkb :: rhnChannel rhn_exception.pks rhnServer rhnServerChann
rhnServerUuid rhnChannelPermissions rhnServerEntitlementView \
rhnChannelFamilyServerPhysical rhnSharedChannelView \
rhnServerFveCapable rhnChannelFamilyServerFve \
+ rhnOrgDistChannelMap \
rhn_user.pks
rhn_channel.pks :: rhnChannel rhnOrgChannelFamilyPermissions \
rhnServerChannel
diff --git a/schema/spacewalk/postgres/packages/packages.deps b/schema/spacewalk/postgres/packages/packages.deps
index 3e0dbf8..0cfb397 100644
--- a/schema/spacewalk/postgres/packages/packages.deps
+++ b/schema/spacewalk/postgres/packages/packages.deps
@@ -27,6 +27,7 @@ rhn_channel.pkb :: rhnChannel rhn_exception.pks rhnServer rhnServerChann
rhnServerUuid rhnChannelPermissions rhnServerEntitlementView \
rhnChannelFamilyServerPhysical rhnSharedChannelView \
rhnServerFveCapable rhnChannelFamilyServerFve \
+ rhnOrgDistChannelMap \
rhn_user.pks
rhn_channel.pks :: rhnChannel rhnOrgChannelFamilyPermissions \
rhnServerChannel
11 years, 2 months
java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/common/db/datasource/test/DataListTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit bb1a1fe904e26f1610335fc7a33e0b97c99fc010
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Apr 29 10:50:41 2013 +0200
removing unnecessary cast
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/test/DataListTest.java b/java/code/src/com/redhat/rhn/common/db/datasource/test/DataListTest.java
index 6b61b7a..c19b275 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/test/DataListTest.java
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/test/DataListTest.java
@@ -161,7 +161,7 @@ public class DataListTest extends RhnBaseTestCase {
}
private DataResult buildElab(Map parms) {
- ArrayList<Map<String, String>> typedDr = (ArrayList<Map<String, String>>)baseDr;
+ ArrayList<Map<String, String>> typedDr = baseDr;
for (Map<String, String> oneRow : typedDr) {
oneRow.put("table_count", "13");
}
11 years, 2 months
Changes to 'refs/tags/spacewalk-setup-1.10.8-1'
by Jan Pazdziora
Tag 'spacewalk-setup-1.10.8-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2013-04-29 06:36 +0000
Tagging package [spacewalk-setup] version [1.10.8-1] in directory [spacewalk/setup/].
Changes since spacecmd-1.10.4-1:
Jan Pazdziora (1):
Automatic commit of package [spacewalk-setup] release [1.10.8-1].
---
rel-eng/packages/spacewalk-setup | 2 +-
spacewalk/setup/spacewalk-setup.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
---
11 years, 2 months
rel-eng/packages spacewalk/setup
by Jan Pazdziora
rel-eng/packages/spacewalk-setup | 2 +-
spacewalk/setup/spacewalk-setup.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 04e567bdf0e09fe98847ece9747e9a3acfb32ecc
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Apr 29 08:36:18 2013 +0200
Automatic commit of package [spacewalk-setup] release [1.10.8-1].
diff --git a/rel-eng/packages/spacewalk-setup b/rel-eng/packages/spacewalk-setup
index b536f08..0ec6f49 100644
--- a/rel-eng/packages/spacewalk-setup
+++ b/rel-eng/packages/spacewalk-setup
@@ -1 +1 @@
-1.10.7-1 spacewalk/setup/
+1.10.8-1 spacewalk/setup/
diff --git a/spacewalk/setup/spacewalk-setup.spec b/spacewalk/setup/spacewalk-setup.spec
index b6e0998..837663d 100644
--- a/spacewalk/setup/spacewalk-setup.spec
+++ b/spacewalk/setup/spacewalk-setup.spec
@@ -1,7 +1,7 @@
%{!?fedora: %global sbinpath /sbin}%{?fedora: %global sbinpath %{_sbindir}}
Name: spacewalk-setup
-Version: 1.10.7
+Version: 1.10.8
Release: 1%{?dist}
Summary: Initial setup tools for Red Hat Spacewalk
@@ -102,6 +102,9 @@ rm -rf %{buildroot}
%doc LICENSE
%changelog
+* Mon Apr 29 2013 Jan Pazdziora 1.10.8-1
+- Support migrations from Satellite 5.5
+
* Tue Apr 23 2013 Jan Pazdziora 1.10.7-1
- Make HEAD work even against AAAA hostname.
11 years, 2 months
Changes to 'refs/tags/spacecmd-1.10.4-1'
by aparsons
Tag 'spacecmd-1.10.4-1' created by Aron Parsons <aronparsons(a)gmail.com> at 2013-04-28 21:09 +0000
Tagging package [spacecmd] version [1.10.4-1] in directory [spacecmd/].
Changes since spacewalk-java-1.10.71-1:
Aron Parsons (2):
947829 - spacecmd errors out when trying to add script to kickstart
Automatic commit of package [spacecmd] release [1.10.4-1].
---
rel-eng/packages/spacecmd | 2 +-
spacecmd/spacecmd.spec | 5 ++++-
spacecmd/src/lib/kickstart.py | 7 ++++++-
3 files changed, 11 insertions(+), 3 deletions(-)
---
11 years, 2 months
2 commits - rel-eng/packages spacecmd/spacecmd.spec spacecmd/src
by aparsons
rel-eng/packages/spacecmd | 2 +-
spacecmd/spacecmd.spec | 5 ++++-
spacecmd/src/lib/kickstart.py | 7 ++++++-
3 files changed, 11 insertions(+), 3 deletions(-)
New commits:
commit 9e0975c70150721c380a5c91e02482e0c89293a2
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Apr 28 17:09:16 2013 -0400
Automatic commit of package [spacecmd] release [1.10.4-1].
diff --git a/rel-eng/packages/spacecmd b/rel-eng/packages/spacecmd
index d979842..2b96e5c 100644
--- a/rel-eng/packages/spacecmd
+++ b/rel-eng/packages/spacecmd
@@ -1 +1 @@
-1.10.3-1 spacecmd/
+1.10.4-1 spacecmd/
diff --git a/spacecmd/spacecmd.spec b/spacecmd/spacecmd.spec
index f1f10a9..e19fd06 100644
--- a/spacecmd/spacecmd.spec
+++ b/spacecmd/spacecmd.spec
@@ -4,7 +4,7 @@
%endif
Name: spacecmd
-Version: 1.10.3
+Version: 1.10.4
Release: 1%{?dist}
Summary: Command-line interface to Spacewalk and Satellite servers
@@ -60,6 +60,9 @@ touch %{buildroot}/%{python_sitelib}/spacecmd/__init__.py
%doc %{_mandir}/man1/spacecmd.1.gz
%changelog
+* Sun Apr 28 2013 Aron Parsons <aronparsons(a)gmail.com> 1.10.4-1
+- 947829 - spacecmd errors out when trying to add script to kickstart
+
* Fri Apr 26 2013 Michael Mraka <michael.mraka(a)redhat.com> 1.10.3-1
- provide support for user.setDetails()
commit 35dcec453a66520666ba29bbc4432c23b28773f7
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Apr 28 17:08:35 2013 -0400
947829 - spacecmd errors out when trying to add script to kickstart
options.template wasn't being set in non-interactive mode
diff --git a/spacecmd/src/lib/kickstart.py b/spacecmd/src/lib/kickstart.py
index ddb4fc8..adcdaca 100644
--- a/spacecmd/src/lib/kickstart.py
+++ b/spacecmd/src/lib/kickstart.py
@@ -1637,7 +1637,8 @@ options:
-e EXECUTION_TIME ['pre', 'post']
-i INTERPRETER
-f FILE
- -c execute in a chroot environment'''
+ -c execute in a chroot environment
+ -t ENABLING_TEMPLATING'''
def complete_kickstart_addscript(self, text, line, beg, end):
parts = line.split(' ')
@@ -1708,6 +1709,10 @@ def do_kickstart_addscript(self, args):
if not options.interpreter:
options.interpreter = '/bin/bash'
+ if not options.template:
+ options.template = False
+
+
if options.file:
options.contents = read_file(options.file)
11 years, 2 months
Changes to 'refs/tags/spacewalk-java-1.10.71-1'
by Grant Gainey
Tag 'spacewalk-java-1.10.71-1' created by Grant Gainey <ggainey(a)redhat.com> at 2013-04-27 17:36 +0000
Tagging package [spacewalk-java] version [1.10.71-1] in directory [java/].
Changes since spacewalk-java-1.10.70-1:
Grant Gainey (7):
With 07504b3d we stopped special-casing # in cfg-files - drop the tests
Separate test from DB (and specifically from Oracle)
Unit-test depends on specific contents of a jar. It changed. Sigh.
Junit teting for errors that we don't even reach on Postgres
Checkstyle fixes
Abstract classes' names can't end in 'Test.java' or JUnit tries to execute them
Automatic commit of package [spacewalk-java] release [1.10.71-1].
---
java/code/src/com/redhat/rhn/common/conf/test/ConfigTest.java | 23 -
java/code/src/com/redhat/rhn/common/db/datasource/test/DataListTest.java | 65 ++++
java/code/src/com/redhat/rhn/common/finder/test/JarFinderTest.java | 24 +
java/code/src/com/redhat/rhn/domain/rhnpackage/test/PackageEvrComparableTest.java | 10
java/code/src/com/redhat/rhn/frontend/security/test/AuthenticationServiceAbstractTest.java | 134 ----------
java/code/src/com/redhat/rhn/frontend/security/test/AuthenticationServiceAbstractTestCase.java | 134 ++++++++++
java/code/src/com/redhat/rhn/frontend/security/test/PxtAuthenticationServiceTest.java | 2
java/spacewalk-java.spec | 11
rel-eng/packages/spacewalk-java | 2
9 files changed, 226 insertions(+), 179 deletions(-)
---
11 years, 2 months
2 commits - java/code java/spacewalk-java.spec rel-eng/packages
by Grant Gainey
java/code/src/com/redhat/rhn/frontend/security/test/AuthenticationServiceAbstractTest.java | 134 ----------
java/code/src/com/redhat/rhn/frontend/security/test/AuthenticationServiceAbstractTestCase.java | 134 ++++++++++
java/code/src/com/redhat/rhn/frontend/security/test/PxtAuthenticationServiceTest.java | 2
java/spacewalk-java.spec | 11
rel-eng/packages/spacewalk-java | 2
5 files changed, 146 insertions(+), 137 deletions(-)
New commits:
commit 9dac0b1e3cf72596f2cab88eba4201b4b235ec80
Author: Grant Gainey <ggainey(a)redhat.com>
Date: Sat Apr 27 13:36:34 2013 -0400
Automatic commit of package [spacewalk-java] release [1.10.71-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index c4efdcb..39abb32 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: 1.10.70
+Version: 1.10.71
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -751,6 +751,15 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Sat Apr 27 2013 Grant Gainey 1.10.71-1
+- Abstract classes' names can't end in 'Test.java' or JUnit tries to execute
+ them
+- Checkstyle fixes
+- Junit teting for errors that we don't even reach on Postgres
+- Unit-test depends on specific contents of a jar. It changed. Sigh.
+- Separate test from DB (and specifically from Oracle)
+- With 07504b3d we stopped special-casing # in cfg-files - drop the tests
+
* Sat Apr 27 2013 Grant Gainey 1.10.70-1
- Fixing some minor query-data-type issues
- ActivationKeys cannot include both a base-channel and children of a
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index b096332..31c02da 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.10.70-1 java/
+1.10.71-1 java/
commit d5570d08358a965bf34309668028b8c1dc68ab43
Author: Grant Gainey <ggainey(a)redhat.com>
Date: Sat Apr 27 13:27:01 2013 -0400
Abstract classes' names can't end in 'Test.java' or JUnit tries to execute them
diff --git a/java/code/src/com/redhat/rhn/frontend/security/test/AuthenticationServiceAbstractTest.java b/java/code/src/com/redhat/rhn/frontend/security/test/AuthenticationServiceAbstractTest.java
deleted file mode 100644
index 0d58f84..0000000
--- a/java/code/src/com/redhat/rhn/frontend/security/test/AuthenticationServiceAbstractTest.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * Copyright (c) 2009--2012 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-package com.redhat.rhn.frontend.security.test;
-
-import com.redhat.rhn.frontend.servlets.PxtSessionDelegate;
-
-import org.jmock.Mock;
-import org.jmock.MockObjectTestCase;
-import org.jmock.core.Constraint;
-import org.jmock.core.Invocation;
-import org.jmock.core.stub.CustomStub;
-
-import java.util.Enumeration;
-import java.util.Vector;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * AuthenticationServiceTest is a base test class for testing AuthenticationService
- * implementations.
- *
- * @version $Rev$
- */
-public abstract class AuthenticationServiceAbstractTest extends MockObjectTestCase {
-
- protected Mock mockRequest;
- protected Mock mockResponse;
- protected Constraint[] requestResponseArgs;
- protected Mock mockPxtDelegate;
- protected String[] requestParamNames;
- protected String[] requestParamValues;
- private String requestUrl;
-
- /**
- * @param name The test case name
- */
- public AuthenticationServiceAbstractTest(String name) {
- super(name);
- }
-
-
- public AuthenticationServiceAbstractTest() {
- }
-
- /**
- * {@inheritDoc}
- */
- protected void setUp() throws Exception {
- super.setUp();
-
- mockRequest = mock(HttpServletRequest.class);
- mockResponse = mock(HttpServletResponse.class);
- mockPxtDelegate = mock(PxtSessionDelegate.class);
-
- requestResponseArgs = new Constraint[] {
- isA(HttpServletRequest.class),
- isA(HttpServletResponse.class)
- };
-
- requestParamNames = new String[] {"question", "answer"};
- requestParamValues = new String[] {
- "param 1 = 'Who is the one?'",
- "param 2 = 'Neo is the one!'"
- };
-
- requestUrl = "https://rhn.redhat.com/rhn/YourRhn.do";
- }
-
-
- protected HttpServletRequest getRequest() {
- return (HttpServletRequest)mockRequest.proxy();
- }
-
-
- protected HttpServletResponse getResponse() {
- return (HttpServletResponse)mockResponse.proxy();
- }
-
- protected PxtSessionDelegate getPxtDelegate() {
- return (PxtSessionDelegate)mockPxtDelegate.proxy();
- }
-
- protected Enumeration getParameterNames() {
- Vector vector = new Vector();
- vector.add(requestParamNames[0]);
- vector.add(requestParamNames[1]);
-
- return vector.elements();
- }
-
- protected String getRequestURL() {
- return requestUrl;
- }
-
-
- protected void setUpRedirectToLogin() {
- mockRequest.stubs().method("getParameterNames").will(
- new CustomStub("Returns parameter names enumeration.") {
- public Object invoke(Invocation arg0) throws Throwable {
- return getParameterNames();
- }
- });
-
- mockRequest.stubs().method("getParameter").with(eq(requestParamNames[0])).will(
- returnValue(requestParamValues[0]));
-
- mockRequest.stubs().method("getParameter").with(eq(requestParamNames[1])).will(
- returnValue(requestParamValues[1]));
-
- mockRequest.stubs().method("getRequestURL").will(returnValue(
- new StringBuffer(getRequestURL())));
-
- mockRequest.stubs().method("getQueryString").will(returnValue(null));
-
- mockRequest.stubs().method("getMethod")
- .will(returnValue(new String("POST")));
-
- mockRequest.stubs().method("setAttribute");
- }
-
-}
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
new file mode 100644
index 0000000..a28da2f
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/security/test/AuthenticationServiceAbstractTestCase.java
@@ -0,0 +1,134 @@
+/**
+ * Copyright (c) 2009--2012 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.frontend.security.test;
+
+import com.redhat.rhn.frontend.servlets.PxtSessionDelegate;
+
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+import org.jmock.core.Constraint;
+import org.jmock.core.Invocation;
+import org.jmock.core.stub.CustomStub;
+
+import java.util.Enumeration;
+import java.util.Vector;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * AuthenticationServiceTest is a base test class for testing AuthenticationService
+ * implementations.
+ *
+ * @version $Rev$
+ */
+public abstract class AuthenticationServiceAbstractTestCase extends MockObjectTestCase {
+
+ protected Mock mockRequest;
+ protected Mock mockResponse;
+ protected Constraint[] requestResponseArgs;
+ protected Mock mockPxtDelegate;
+ protected String[] requestParamNames;
+ protected String[] requestParamValues;
+ private String requestUrl;
+
+ /**
+ * @param name The test case name
+ */
+ public AuthenticationServiceAbstractTestCase(String name) {
+ super(name);
+ }
+
+
+ public AuthenticationServiceAbstractTestCase() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ mockRequest = mock(HttpServletRequest.class);
+ mockResponse = mock(HttpServletResponse.class);
+ mockPxtDelegate = mock(PxtSessionDelegate.class);
+
+ requestResponseArgs = new Constraint[] {
+ isA(HttpServletRequest.class),
+ isA(HttpServletResponse.class)
+ };
+
+ requestParamNames = new String[] {"question", "answer"};
+ requestParamValues = new String[] {
+ "param 1 = 'Who is the one?'",
+ "param 2 = 'Neo is the one!'"
+ };
+
+ requestUrl = "https://rhn.redhat.com/rhn/YourRhn.do";
+ }
+
+
+ protected HttpServletRequest getRequest() {
+ return (HttpServletRequest)mockRequest.proxy();
+ }
+
+
+ protected HttpServletResponse getResponse() {
+ return (HttpServletResponse)mockResponse.proxy();
+ }
+
+ protected PxtSessionDelegate getPxtDelegate() {
+ return (PxtSessionDelegate)mockPxtDelegate.proxy();
+ }
+
+ protected Enumeration getParameterNames() {
+ Vector vector = new Vector();
+ vector.add(requestParamNames[0]);
+ vector.add(requestParamNames[1]);
+
+ return vector.elements();
+ }
+
+ protected String getRequestURL() {
+ return requestUrl;
+ }
+
+
+ protected void setUpRedirectToLogin() {
+ mockRequest.stubs().method("getParameterNames").will(
+ new CustomStub("Returns parameter names enumeration.") {
+ public Object invoke(Invocation arg0) throws Throwable {
+ return getParameterNames();
+ }
+ });
+
+ mockRequest.stubs().method("getParameter").with(eq(requestParamNames[0])).will(
+ returnValue(requestParamValues[0]));
+
+ mockRequest.stubs().method("getParameter").with(eq(requestParamNames[1])).will(
+ returnValue(requestParamValues[1]));
+
+ mockRequest.stubs().method("getRequestURL").will(returnValue(
+ new StringBuffer(getRequestURL())));
+
+ mockRequest.stubs().method("getQueryString").will(returnValue(null));
+
+ mockRequest.stubs().method("getMethod")
+ .will(returnValue(new String("POST")));
+
+ 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 06ea5b2..1f20672 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
@@ -30,7 +30,7 @@ import javax.servlet.http.HttpServletRequest;
* @version $Rev$
*/
// TODO Review Test classes in package to factor out common code
-public class PxtAuthenticationServiceTest extends AuthenticationServiceAbstractTest {
+public class PxtAuthenticationServiceTest extends AuthenticationServiceAbstractTestCase {
private class PxtAuthenticationServiceStub extends PxtAuthenticationService {
}
11 years, 2 months