From 733027b6bffd249d36d0b12bfa8592d94dbc281b Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@hostsharing.net>
Date: Thu, 05 May 2011 20:42:58 +0200
Subject: [PATCH] Test Hostmaster ad

---
 hsarback/test/de/hsadmin/remote/RemoteTest.java   |    8 +++++---
 hsarback/test/de/hsadmin/remote/InitDataTest.java |   24 ++++++++++++------------
 hsarback/test/de/hsadmin/remote/CustomerTest.java |    7 ++++---
 3 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/hsarback/test/de/hsadmin/remote/CustomerTest.java b/hsarback/test/de/hsadmin/remote/CustomerTest.java
index d9ee6b5..1b3c9a2 100644
--- a/hsarback/test/de/hsadmin/remote/CustomerTest.java
+++ b/hsarback/test/de/hsadmin/remote/CustomerTest.java
@@ -64,10 +64,11 @@
 		try {
 			client.execute(MODULE + ".add", params);
 			assertEquals(membersCount + 1, getMembersCount(user));
-			for (int idx=11; idx < 99; idx++) {
+			for (int idx=11; idx < 100; idx++) {
 				setParams.put("membercode", "hsh00-n" + idx);
 				setParams.put("memberno", "200" + idx);
-				setParams.put("contact_street", "Hauptstr. " + idx);				
+				setParams.put("contact_street", "Hauptstr. " + idx);	
+				params[1] = cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL());
 				client.execute(MODULE + ".add", params);
 			}
 		} catch (XmlRpcException e) {
@@ -86,7 +87,7 @@
 		try {
 			Object execute = client.execute(MODULE + ".search", params);
 			Object[] result = (Object[]) execute;
-			assertTrue(result.length > 98);
+			assertTrue(result.length > 90);
 		} catch (XmlRpcException e) {
 			fail(e.getMessage());
 		}
diff --git a/hsarback/test/de/hsadmin/remote/InitDataTest.java b/hsarback/test/de/hsadmin/remote/InitDataTest.java
index cebacaf..2f31547 100644
--- a/hsarback/test/de/hsadmin/remote/InitDataTest.java
+++ b/hsarback/test/de/hsadmin/remote/InitDataTest.java
@@ -35,12 +35,12 @@
 
 	@Test
 	public void testAddMember() {
-		String user = "pe";
+		String user = "ad";
 		int membersCount = -9999;
 		membersCount = getMembersCount();
 		String grantingTicketURL = cas.getGrantingTicketURL(user);
 		Map<String, String> setParams = new HashMap<String, String>();
-		setParams.put("membercode", "hsh90-aaa");
+		setParams.put("membercode", "hsh00-aaa");
 		setParams.put("password", "geheimnIs");
 		setParams.put("memberno", "20001");
 		setParams.put("membersince", "01.10.2010");
@@ -72,14 +72,14 @@
 	@Test
 	public void testAddPac() {
 		int count = getPacsCount();
-		String user = "pe";
+		String user = "ad";
 		String grantingTicketURL = cas.getGrantingTicketURL(user);
 		Map<String, String> setParams = new HashMap<String, String>();
 		setParams.put("name", "aaa00");
-		setParams.put("hive", "h90");
-		setParams.put("customer", "hsh90-aaa");
+		setParams.put("hive", "h81");
+		setParams.put("customer", "hsh00-aaa");
 		setParams.put("basepac", "DW/B");
-		setParams.put("curinetaddr", "83.223.95.132");
+		setParams.put("curinetaddr", "192.168.108.201");
 		Object[] params = new Object[] { user, 
 				cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()), 
 				setParams };
@@ -95,7 +95,7 @@
 	@Test
 	public void testDelPac() {
 		int count = getPacsCount();
-		String user = "pe";
+		String user = "ad";
 		String grantingTicketURL = cas.getGrantingTicketURL(user);
 		Map<String, String> whereParams = new HashMap<String, String>();
 		whereParams.put("name", "aaa00");
@@ -113,10 +113,10 @@
 	@Test
 	public void testDelMember() {
 		int count = getMembersCount();
-		String user = "pe";
+		String user = "ad";
 		String grantingTicketURL = cas.getGrantingTicketURL(user);
 		Map<String, String> whereParams = new HashMap<String, String>();
-		whereParams.put("membercode", "hsh90-aaa");
+		whereParams.put("membercode", "hsh00-aaa");
 		Object[] params = new Object[] { user, 
 				cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()), 
 				whereParams };
@@ -130,7 +130,7 @@
 
 	private int getMembersCount() {
 		int count = 0;
-		String user = "pe";
+		String user = "ad";
 		String grantingTicketURL = cas.getGrantingTicketURL(user);
 		Map<String, String> whereParams = new HashMap<String, String>();
 		Object[] params = new Object[] { user, 
@@ -149,10 +149,10 @@
 
 	private int getPacsCount() {
 		int count = 0;
-		String user = "pe";
+		String user = "ad";
 		String grantingTicketURL = cas.getGrantingTicketURL(user);
 		Map<String, String> whereParams = new HashMap<String, String>();
-		whereParams.put("customer", "hsh90-aaa");
+		whereParams.put("customer", "hsh00-aaa");
 		Object[] params = new Object[] { user, 
 				cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()), 
 				whereParams };
diff --git a/hsarback/test/de/hsadmin/remote/RemoteTest.java b/hsarback/test/de/hsadmin/remote/RemoteTest.java
index bfeb293..ba1cc6e 100644
--- a/hsarback/test/de/hsadmin/remote/RemoteTest.java
+++ b/hsarback/test/de/hsadmin/remote/RemoteTest.java
@@ -5,11 +5,13 @@
 
 @RunWith(Suite.class)
 @Suite.SuiteClasses({
+	InitDataTest.class,
 	CustomerTest.class,
 	UnixUserTest.class,
-//	MySqlDatabaseTest.class,
-//	MySqlUserTest.class,
-//	PgSqlUserTest.class,
+	MysqlDbTest.class,
+	MysqlUserTest.class,
+	PgsqlDbTest.class,
+	PgsqlUserTest.class,
 	EMailAliasTest.class,
 	EMailAddressTest.class,
 	DomainTest.class,

--
Gitblit v1.9.1