work on tests

This commit is contained in:
Peter Hormanns 2011-05-06 14:54:43 +00:00
parent 6d4a3fbca9
commit 8b270bf373
3 changed files with 17 additions and 16 deletions

View File

@ -86,14 +86,14 @@ public class PacTest {
@Test @Test
public void testCreate() { public void testCreate() {
int count = getPacsCount(); int count = getPacsCount();
String user = "pe"; String user = "ad";
String grantingTicketURL = cas.getGrantingTicketURL(user); String grantingTicketURL = cas.getGrantingTicketURL(user);
Map<String, String> setParams = new HashMap<String, String>(); Map<String, String> setParams = new HashMap<String, String>();
setParams.put("name", "aaa01"); setParams.put("name", "aaa01");
setParams.put("hive", "h90"); setParams.put("hive", "h81");
setParams.put("customer", config.getProperty("accountprefix.customer") + "-aaa"); setParams.put("customer", config.getProperty("accountprefix.customer") + "-aaa");
setParams.put("basepac", "DW/B"); setParams.put("basepac", "DW/B");
setParams.put("curinetaddr", "83.223.95.133"); setParams.put("curinetaddr", "192.168.108.202");
Object[] params = new Object[] { user, Object[] params = new Object[] { user,
cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()), cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()),
setParams }; setParams };
@ -109,7 +109,7 @@ public class PacTest {
@Test @Test
public void testDelete() { public void testDelete() {
int count = getPacsCount(); int count = getPacsCount();
String user = "pe"; String user = "ad";
String grantingTicketURL = cas.getGrantingTicketURL(user); String grantingTicketURL = cas.getGrantingTicketURL(user);
Map<String, String> whereParams = new HashMap<String, String>(); Map<String, String> whereParams = new HashMap<String, String>();
whereParams.put("name", "aaa01"); whereParams.put("name", "aaa01");
@ -127,7 +127,7 @@ public class PacTest {
private int getPacsCount() { private int getPacsCount() {
int count = 0; int count = 0;
String user = "hsh90-aaa"; String user = "hsh00-aaa";
String grantingTicketURL = cas.getGrantingTicketURL(user); String grantingTicketURL = cas.getGrantingTicketURL(user);
Map<String, String> whereParams = new HashMap<String, String>(); Map<String, String> whereParams = new HashMap<String, String>();
whereParams.put("customer", config.getProperty("accountprefix.customer") + "-aaa"); whereParams.put("customer", config.getProperty("accountprefix.customer") + "-aaa");

View File

@ -6,17 +6,18 @@ import org.junit.runners.Suite;
@RunWith(Suite.class) @RunWith(Suite.class)
@Suite.SuiteClasses({ @Suite.SuiteClasses({
InitDataTest.class, InitDataTest.class,
CustomerTest.class, PacTest.class,
UnixUserTest.class, UnixUserTest.class,
MysqlDbTest.class, CustomerTest.class
MysqlUserTest.class, // MysqlDbTest.class,
PgsqlDbTest.class, // MysqlUserTest.class,
PgsqlUserTest.class, // PgsqlDbTest.class,
EMailAliasTest.class, // PgsqlUserTest.class,
EMailAddressTest.class, // EMailAliasTest.class,
DomainTest.class, // EMailAddressTest.class,
// DomainTest.class,
// HostmasterTest.class, // HostmasterTest.class,
QueueTaskTest.class // QueueTaskTest.class
}) })
public class RemoteTest { public class RemoteTest {

View File

@ -43,7 +43,7 @@ public class UnixUserTest {
try { try {
Object execute = client.execute(MODULE + ".search", params); Object execute = client.execute(MODULE + ".search", params);
Object[] result = (Object[]) execute; Object[] result = (Object[]) execute;
assertEquals(1, result.length); assertEquals(2, result.length);
for (Object o : result) { for (Object o : result) {
if (o instanceof Map<?, ?>) { if (o instanceof Map<?, ?>) {
Map<?, ?> row = (Map<?, ?>) o; Map<?, ?> row = (Map<?, ?>) o;
@ -136,7 +136,7 @@ public class UnixUserTest {
String grantingTicketURL = cas.getGrantingTicketURL(user); String grantingTicketURL = cas.getGrantingTicketURL(user);
Map<String, String> whereParams = new HashMap<String, String>(); Map<String, String> whereParams = new HashMap<String, String>();
Map<String, String> setParams = new HashMap<String, String>(); Map<String, String> setParams = new HashMap<String, String>();
whereParams.put("name", "aaa00-test2"); whereParams.put("name", "aaa00-test3");
setParams.put("password", "test1234"); setParams.put("password", "test1234");
Object[] params = new Object[] { user, Object[] params = new Object[] { user,
cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()), cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()),