data and test for pac.add SRV/MDG
This commit is contained in:
parent
8e487713b7
commit
c9f5e29792
@ -25,6 +25,10 @@ INSERT INTO basecomponent (basecomponent_code, description, sorting, valid)
|
|||||||
VALUES ('MIRROR', 'Echtzeitspiegelung der Daten', 500, true);
|
VALUES ('MIRROR', 'Echtzeitspiegelung der Daten', 500, true);
|
||||||
INSERT INTO basecomponent (basecomponent_code, description, sorting, valid)
|
INSERT INTO basecomponent (basecomponent_code, description, sorting, valid)
|
||||||
VALUES ('BACKUP', 'Nächtliches Backup', 600, true);
|
VALUES ('BACKUP', 'Nächtliches Backup', 600, true);
|
||||||
|
INSERT INTO basecomponent (basecomponent_code, description, sorting, valid)
|
||||||
|
VALUES ('DISK', 'Nächtliches Backup', 700, true);
|
||||||
|
INSERT INTO basecomponent (basecomponent_code, description, sorting, valid)
|
||||||
|
VALUES ('CPU', 'Nächtliches Backup', 800, true);
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table: component
|
-- Table: component
|
||||||
@ -65,7 +69,13 @@ INSERT INTO component (basepacket_id, basecomponent_id, min_quantity, max_quanti
|
|||||||
SELECT basepacket_id, basecomponent_id, 0, 1, 1, 1, 1, false, 205 FROM basepacket, basecomponent WHERE basepacket_code='PAC/SW' AND basecomponent_code='BACKUP';
|
SELECT basepacket_id, basecomponent_id, 0, 1, 1, 1, 1, false, 205 FROM basepacket, basecomponent WHERE basepacket_code='PAC/SW' AND basecomponent_code='BACKUP';
|
||||||
INSERT INTO component (basepacket_id, basecomponent_id, min_quantity, max_quantity, default_quantity, increment_quantity, include_quantity, admin_only, article_number)
|
INSERT INTO component (basepacket_id, basecomponent_id, min_quantity, max_quantity, default_quantity, increment_quantity, include_quantity, admin_only, article_number)
|
||||||
SELECT basepacket_id, basecomponent_id, 0, 1, 1, 1, 1, false, 305 FROM basepacket, basecomponent WHERE basepacket_code='PAC/WEB' AND basecomponent_code='BACKUP';
|
SELECT basepacket_id, basecomponent_id, 0, 1, 1, 1, 1, false, 305 FROM basepacket, basecomponent WHERE basepacket_code='PAC/WEB' AND basecomponent_code='BACKUP';
|
||||||
|
INSERT INTO component (basepacket_id, basecomponent_id, min_quantity, max_quantity, default_quantity, increment_quantity, include_quantity, admin_only, article_number)
|
||||||
|
SELECT basepacket_id, basecomponent_id, 25, 100, 25, 25, 0, false, 410 FROM basepacket, basecomponent WHERE basepacket_code='SRV/MGD' AND basecomponent_code='DISK';
|
||||||
|
INSERT INTO component (basepacket_id, basecomponent_id, min_quantity, max_quantity, default_quantity, increment_quantity, include_quantity, admin_only, article_number)
|
||||||
|
SELECT basepacket_id, basecomponent_id, 1, 16, 1, 1, 0, false, 420 FROM basepacket, basecomponent WHERE basepacket_code='SRV/MGD' AND basecomponent_code='CPU';
|
||||||
|
INSERT INTO component (basepacket_id, basecomponent_id, min_quantity, max_quantity, default_quantity, increment_quantity, include_quantity, admin_only, article_number)
|
||||||
|
SELECT basepacket_id, basecomponent_id, 10, 1000, 10, 10, 0, false, 430 FROM basepacket, basecomponent WHERE basepacket_code='SRV/MGD' AND basecomponent_code='TRAFFIC';
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table: business_partner
|
-- Table: business_partner
|
||||||
--
|
--
|
||||||
|
@ -85,7 +85,7 @@ public class PacTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCreate() {
|
public void testCreateWeb() {
|
||||||
int count = getPacsCount();
|
int count = getPacsCount();
|
||||||
String user = "ad";
|
String user = "ad";
|
||||||
String grantingTicketURL = cas.getGrantingTicketURL(user);
|
String grantingTicketURL = cas.getGrantingTicketURL(user);
|
||||||
@ -124,6 +124,43 @@ public class PacTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreateMdg() {
|
||||||
|
int count = getPacsCount();
|
||||||
|
String user = "ad";
|
||||||
|
String grantingTicketURL = cas.getGrantingTicketURL(user);
|
||||||
|
Map<String, Object> setParams = new HashMap<String, Object>();
|
||||||
|
setParams.put("name", "aaa90");
|
||||||
|
setParams.put("hive", "h99");
|
||||||
|
setParams.put("customer", config.getProperty("accountprefix.customer") + "-aaa");
|
||||||
|
setParams.put("basepac", Pac.PAC_SRV);
|
||||||
|
setParams.put("curinetaddr", "176.9.242.76");
|
||||||
|
setParams.put("free", "true");
|
||||||
|
Object[] params = new Object[] { user,
|
||||||
|
cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()),
|
||||||
|
setParams };
|
||||||
|
try {
|
||||||
|
Object execute = client.execute(MODULE + ".add", params);
|
||||||
|
assertTrue(execute instanceof Map<?, ?>);
|
||||||
|
} catch (XmlRpcException e) {
|
||||||
|
fail(e.getMessage());
|
||||||
|
}
|
||||||
|
assertEquals(count + 1, getPacsCount());
|
||||||
|
Map<String, String> whereParams = new HashMap<String, String>();
|
||||||
|
whereParams.put("name", "aaa90");
|
||||||
|
params = new Object[] { user,
|
||||||
|
cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()),
|
||||||
|
whereParams };
|
||||||
|
try {
|
||||||
|
Object execute = client.execute(MODULE + ".search", params);
|
||||||
|
assertTrue(execute instanceof Object[]);
|
||||||
|
Object[] resultArr = (Object[]) execute;
|
||||||
|
assertEquals(1, resultArr.length);
|
||||||
|
} catch (XmlRpcException e) {
|
||||||
|
fail(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// @Test
|
// @Test
|
||||||
public void testDelete() {
|
public void testDelete() {
|
||||||
int count = getPacsCount();
|
int count = getPacsCount();
|
||||||
|
Loading…
Reference in New Issue
Block a user