java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/test/IssMasterSerializerTest.java
| 3
java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java
| 39 +++++-----
java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/slave/test/SlaveHandlerTest.java
| 25 +++---
java/spacewalk-java.spec
| 5 +
rel-eng/packages/spacewalk-java
| 2
5 files changed, 42 insertions(+), 32 deletions(-)
New commits:
commit 060028c0ff51b7759c1669553f0ef23407601e87
Author: Grant Gainey <ggainey(a)redhat.com>
Date: Tue Jul 2 15:58:53 2013 -0400
Automatic commit of package [spacewalk-java] release [1.10.112-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 174afec..e65a7ad 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.111
+Version: 1.10.112
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -751,6 +751,9 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Tue Jul 02 2013 Grant Gainey 1.10.112-1
+- 977878 - Keep some unit-tests from overlapping
+
* Tue Jul 02 2013 Tomas Kasparek <tkasparek(a)redhat.com> 1.10.111-1
- checkstyle fix
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 54f61bb..80a0633 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.10.111-1 java/
+1.10.112-1 java/
commit f7fb1238a6de4cfd028a52607544ae2ec7fdebdf
Author: Grant Gainey <ggainey(a)redhat.com>
Date: Tue Jul 2 15:58:05 2013 -0400
977878 - Keep some unit-tests from overlapping
diff --git
a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/test/IssMasterSerializerTest.java
b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/test/IssMasterSerializerTest.java
index 697ac50..490bfda 100644
---
a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/test/IssMasterSerializerTest.java
+++
b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/test/IssMasterSerializerTest.java
@@ -31,6 +31,7 @@ import com.redhat.rhn.domain.iss.IssMaster;
import com.redhat.rhn.domain.iss.IssMasterOrg;
import com.redhat.rhn.frontend.xmlrpc.serializer.IssMasterOrgSerializer;
import com.redhat.rhn.frontend.xmlrpc.serializer.IssMasterSerializer;
+import com.redhat.rhn.testing.TestUtils;
public class IssMasterSerializerTest extends MockObjectTestCase {
private String[] masterOrgNames = {"masterOrg1", "masterOrg2",
"masterOrg3"};
@@ -69,7 +70,7 @@ public class IssMasterSerializerTest extends MockObjectTestCase {
long baseId = 1001L;
IssMaster master = new IssMaster();
- master.setLabel("testMaster");
+ master.setLabel("testMaster" + TestUtils.randomString());
Set<IssMasterOrg> orgs = new HashSet<IssMasterOrg>();
for (String orgName : masterOrgNames) {
IssMasterOrg anOrg = new IssMasterOrg();
diff --git
a/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java
b/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java
index 67db63f..0aa78c7 100644
---
a/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java
+++
b/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java
@@ -27,21 +27,24 @@ import com.redhat.rhn.domain.role.RoleFactory;
import com.redhat.rhn.frontend.xmlrpc.PermissionCheckFailureException;
import com.redhat.rhn.frontend.xmlrpc.sync.master.MasterHandler;
import com.redhat.rhn.frontend.xmlrpc.test.BaseHandlerTestCase;
+import com.redhat.rhn.testing.TestUtils;
public class MasterHandlerTest extends BaseHandlerTestCase {
private MasterHandler handler = new MasterHandler();
private String[] masterOrgNames = {"masterOrg01", "masterOrg02",
"masterOrg03"};
+ private String masterName;
public void setUp() throws Exception {
super.setUp();
+ masterName = "testMaster" + TestUtils.randomString();
admin.addRole(RoleFactory.SAT_ADMIN);
}
public void testCreate() {
// Make sure that non-sat-admin users cannot access
try {
- IssMaster master = handler.create(regularKey, "testCreate");
+ IssMaster master = handler.create(regularKey, masterName);
fail();
}
catch (PermissionCheckFailureException e) {
@@ -50,8 +53,8 @@ public class MasterHandlerTest extends BaseHandlerTestCase {
// Make sure satellite-admin can
try {
- IssMaster master = handler.create(adminKey, "testCreate");
- assertEquals("testCreate", master.getLabel());
+ IssMaster master = handler.create(adminKey, masterName);
+ assertEquals(masterName, master.getLabel());
}
catch (PermissionCheckFailureException e) {
fail();
@@ -59,13 +62,13 @@ public class MasterHandlerTest extends BaseHandlerTestCase {
}
public void testUpdate() {
- IssMaster master = handler.create(adminKey, "testCreate");
+ IssMaster master = handler.create(adminKey, masterName);
// Make sure that non-sat-admin users cannot access
try {
IssMaster updMaster = handler.update(regularKey,
master.getId().intValue(),
- "testCreateNew");
+ "new_" + masterName);
fail();
}
catch (PermissionCheckFailureException e) {
@@ -75,8 +78,8 @@ public class MasterHandlerTest extends BaseHandlerTestCase {
// Make sure satellite-admin can
try {
IssMaster updMaster = handler.update(adminKey, master.getId().intValue(),
- "testCreateNew");
- assertEquals("testCreateNew", updMaster.getLabel());
+ "new_" + masterName);
+ assertEquals("new_" + masterName, updMaster.getLabel());
assertEquals(master.getId(), updMaster.getId());
}
catch (PermissionCheckFailureException e) {
@@ -85,7 +88,7 @@ public class MasterHandlerTest extends BaseHandlerTestCase {
}
public void testDelete() {
- IssMaster master = handler.create(adminKey, "testCreate");
+ IssMaster master = handler.create(adminKey, masterName);
Long mstrId = master.getId();
// Make sure that non-sat-admin users cannot access
@@ -112,7 +115,7 @@ public class MasterHandlerTest extends BaseHandlerTestCase {
}
public void testGetMaster() {
- IssMaster master = handler.create(adminKey, "testCreate");
+ IssMaster master = handler.create(adminKey, masterName);
Integer mstrId = master.getId().intValue();
// Make sure that non-sat-admin users cannot access
@@ -135,11 +138,11 @@ public class MasterHandlerTest extends BaseHandlerTestCase {
}
public void testGetMasterByLabel() {
- IssMaster master = handler.create(adminKey, "testCreate");
+ IssMaster master = handler.create(adminKey, masterName);
// Make sure that non-sat-admin users cannot access
try {
- IssMaster gotMaster = handler.getMasterByLabel(regularKey,
"testCreate");
+ IssMaster gotMaster = handler.getMasterByLabel(regularKey, masterName);
fail();
}
catch (PermissionCheckFailureException e) {
@@ -148,9 +151,9 @@ public class MasterHandlerTest extends BaseHandlerTestCase {
// Make sure satellite-admin can
try {
- IssMaster gotMaster = handler.getMasterByLabel(adminKey,
"testCreate");
+ IssMaster gotMaster = handler.getMasterByLabel(adminKey, masterName);
assertNotNull(gotMaster);
- assertEquals("testCreate", gotMaster.getLabel());
+ assertEquals(masterName, gotMaster.getLabel());
}
catch (PermissionCheckFailureException e) {
fail();
@@ -158,7 +161,7 @@ public class MasterHandlerTest extends BaseHandlerTestCase {
}
public void testGetMasterOrgs() {
- IssMaster master = handler.create(adminKey, "testCreate");
+ IssMaster master = handler.create(adminKey, masterName);
// Make sure that non-sat-admin users cannot access
try {
@@ -184,7 +187,7 @@ public class MasterHandlerTest extends BaseHandlerTestCase {
}
public void testMappedMasterOrgs() {
- IssMaster master = handler.create(adminKey, "testCreate");
+ IssMaster master = handler.create(adminKey, masterName);
addOrgsTo(master, false);
assertEquals(0, master.getNumMappedMasterOrgs());
assertEquals(masterOrgNames.length, master.getNumMasterOrgs());
@@ -230,7 +233,7 @@ public class MasterHandlerTest extends BaseHandlerTestCase {
}
public void testSetMasterOrgs() {
- IssMaster master = handler.create(adminKey, "testCreate");
+ IssMaster master = handler.create(adminKey, masterName);
List<IssMasterOrg> someOrgs = getBareOrgs(true);
@@ -290,7 +293,7 @@ public class MasterHandlerTest extends BaseHandlerTestCase {
}
public void testAddOrg() {
- IssMaster master = handler.create(adminKey, "testCreate");
+ IssMaster master = handler.create(adminKey, masterName);
IssMasterOrg org = new IssMasterOrg();
org.setMasterOrgName("newMasterOrg");
org.setMasterOrgId(1001L);
@@ -325,7 +328,7 @@ public class MasterHandlerTest extends BaseHandlerTestCase {
public void testMapToLocal() {
IssMaster master = new IssMaster();
- master.setLabel("testCreate");
+ master.setLabel(masterName);
IssFactory.save(master);
addOrgsTo(master, false);
diff --git
a/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/slave/test/SlaveHandlerTest.java
b/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/slave/test/SlaveHandlerTest.java
index 876ba65..48e13ca 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/slave/test/SlaveHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/slave/test/SlaveHandlerTest.java
@@ -25,20 +25,23 @@ import com.redhat.rhn.domain.role.RoleFactory;
import com.redhat.rhn.frontend.xmlrpc.PermissionCheckFailureException;
import com.redhat.rhn.frontend.xmlrpc.sync.slave.SlaveHandler;
import com.redhat.rhn.frontend.xmlrpc.test.BaseHandlerTestCase;
+import com.redhat.rhn.testing.TestUtils;
public class SlaveHandlerTest extends BaseHandlerTestCase {
private SlaveHandler handler = new SlaveHandler();
+ private String slaveName;
public void setUp() throws Exception {
super.setUp();
admin.addRole(RoleFactory.SAT_ADMIN);
+ slaveName = "testSlave" + TestUtils.randomString();
}
public void testCreate() {
// Make sure that non-sat-admin users cannot access
try {
- IssSlave slave = handler.create(regularKey, "testCreate", true,
true);
+ IssSlave slave = handler.create(regularKey, slaveName, true, true);
fail();
}
catch (PermissionCheckFailureException e) {
@@ -47,8 +50,8 @@ public class SlaveHandlerTest extends BaseHandlerTestCase {
// Make sure satellite-admin can
try {
- IssSlave slave = handler.create(adminKey, "testCreate", true,
true);
- assertEquals("testCreate", slave.getSlave());
+ IssSlave slave = handler.create(adminKey, slaveName, true, true);
+ assertEquals(slaveName, slave.getSlave());
assertTrue("Y".equals(slave.getEnabled()));
assertTrue("Y".equals(slave.getAllowAllOrgs()));
}
@@ -58,13 +61,13 @@ public class SlaveHandlerTest extends BaseHandlerTestCase {
}
public void testUpdate() {
- IssSlave slave = handler.create(adminKey, "testCreate", true, true);
+ IssSlave slave = handler.create(adminKey, slaveName, true, true);
// Make sure that non-sat-admin users cannot access
try {
IssSlave updSlave = handler.update(regularKey,
slave.getId().intValue(),
- "testCreateNew",
+ "new_" + slaveName,
false,
false);
fail();
@@ -76,8 +79,8 @@ public class SlaveHandlerTest extends BaseHandlerTestCase {
// Make sure satellite-admin can
try {
IssSlave updSlave = handler.update(adminKey, slave.getId().intValue(),
- "testCreateNew", false, false);
- assertEquals("testCreateNew", updSlave.getSlave());
+ "new_" + slaveName, false, false);
+ assertEquals("new_" + slaveName, updSlave.getSlave());
assertEquals(slave.getId(), updSlave.getId());
assertTrue("N".equals(slave.getEnabled()));
assertTrue("N".equals(slave.getAllowAllOrgs()));
@@ -88,7 +91,7 @@ public class SlaveHandlerTest extends BaseHandlerTestCase {
}
public void testDelete() {
- IssSlave slave = handler.create(adminKey, "testCreate", true, true);
+ IssSlave slave = handler.create(adminKey, slaveName, true, true);
Long slaveId = slave.getId();
// Make sure that non-sat-admin users cannot access
@@ -115,7 +118,7 @@ public class SlaveHandlerTest extends BaseHandlerTestCase {
}
public void testGetSlave() {
- IssSlave slave = handler.create(adminKey, "testCreate", true, true);
+ IssSlave slave = handler.create(adminKey, slaveName, true, true);
Integer slaveId = slave.getId().intValue();
// Make sure that non-sat-admin users cannot access
@@ -138,7 +141,7 @@ public class SlaveHandlerTest extends BaseHandlerTestCase {
}
public void testGetAllowedOrgs() {
- IssSlave slave = handler.create(adminKey, "testCreate", true, false);
+ IssSlave slave = handler.create(adminKey, slaveName, true, false);
// Make sure that non-sat-admin users cannot access
try {
@@ -163,7 +166,7 @@ public class SlaveHandlerTest extends BaseHandlerTestCase {
}
public void testSetAllowedOrgs() {
- IssSlave slave = handler.create(adminKey, "testCreate", true, false);
+ IssSlave slave = handler.create(adminKey, slaveName, true, false);
List<Integer> orgs = getBareOrgs();