Test Hostmaster ad

This commit is contained in:
Peter Hormanns 2011-05-05 18:12:04 +00:00
parent 62369dc8b7
commit 6135898d93
2 changed files with 11 additions and 9 deletions

View File

@ -119,5 +119,5 @@ INSERT INTO unixuser (name, comment, shell, homedir, locked, packet_id, userid)
SELECT 'hsh01', 'packet hsh01', '/bin/bash', '/home/pacs/hsh01', FALSE, packet_id, 10002 FROM packet
WHERE packet_name='hsh01';
INSERT INTO unixuser (name, comment, shell, homedir, locked, packet_id, userid)
SELECT 'hsh01-pe', 'hostmaster pe', '/bin/bash', '/home/pacs/hsh01/users/pe', FALSE, packet_id, 10003 FROM packet
SELECT 'hsh01-ad', 'hostmaster ad', '/bin/bash', '/home/pacs/hsh01/users/ad', FALSE, packet_id, 10003 FROM packet
WHERE packet_name='hsh01';

View File

@ -34,7 +34,7 @@ public class CustomerTest {
@Test
public void testAddAsHostmaster() {
String user = "pe";
String user = "ad";
int membersCount = -9999;
try {
membersCount = getMembersCount(user);
@ -63,10 +63,12 @@ public class CustomerTest {
setParams };
try {
client.execute(MODULE + ".add", params);
// Object execute = client.execute(MODULE + ".add", params);
// Map<?, ?> result = (Map<?, ?>) execute;
// System.out.println(result);
assertEquals(membersCount + 1, getMembersCount(user));
for (int idx=11; idx < 99; idx++) {
setParams.put("membercode", "hsh00-n" + idx);
setParams.put("memberno", "200" + idx);
client.execute(MODULE + ".add", params);
}
} catch (XmlRpcException e) {
fail(e.getMessage());
}
@ -74,7 +76,7 @@ public class CustomerTest {
@Test
public void testSearchAsHostmaster() {
String user = "pe";
String user = "ad";
String grantingTicketURL = cas.getGrantingTicketURL(user);
Map<String, String> whereParams = new HashMap<String, String>();
Object[] params = new Object[] { user,
@ -83,7 +85,7 @@ public class CustomerTest {
try {
Object execute = client.execute(MODULE + ".search", params);
Object[] result = (Object[]) execute;
assertTrue(result.length > 100);
assertTrue(result.length > 98);
} catch (XmlRpcException e) {
fail(e.getMessage());
}
@ -161,7 +163,7 @@ public class CustomerTest {
@Test
public void testUpdateAsHostmaster() {
String user = "pe";
String user = "ad";
String grantingTicketURL = cas.getGrantingTicketURL(user);
Map<String, String> whereParams = new HashMap<String, String>();
Map<String, String> setParams = new HashMap<String, String>();
@ -197,7 +199,7 @@ public class CustomerTest {
@Test
public void testDeleteAsHostmaster() {
String user = "pe";
String user = "ad";
int membersCount = -9999;
try {
membersCount = getMembersCount(user);