Teste die neuen Domain Optionen
This commit is contained in:
parent
0941515461
commit
fea2612a48
@ -9,6 +9,7 @@ import java.io.IOException;
|
|||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
import org.apache.xmlrpc.XmlRpcException;
|
import org.apache.xmlrpc.XmlRpcException;
|
||||||
import org.apache.xmlrpc.client.XmlRpcClient;
|
import org.apache.xmlrpc.client.XmlRpcClient;
|
||||||
@ -158,7 +159,8 @@ public class DomainTest {
|
|||||||
setParams = new HashMap<String, Object>();
|
setParams = new HashMap<String, Object>();
|
||||||
whereParams = new HashMap<String, String>();
|
whereParams = new HashMap<String, String>();
|
||||||
setParams.put("validsubdomainnames", "www2");
|
setParams.put("validsubdomainnames", "www2");
|
||||||
setParams.put("domainoptions", new String[] {"greylisting", "letsencrypt"});
|
String[] newDomainOptions = new String[] {"greylisting", "letsencrypt", "passenger", "passengerfriendlyerrorpages", "cgi", "fastcgi"};
|
||||||
|
setParams.put("domainoptions", newDomainOptions);
|
||||||
whereParams.put("name", "exampleupdate.de");
|
whereParams.put("name", "exampleupdate.de");
|
||||||
params = new Object[] { user,
|
params = new Object[] { user,
|
||||||
cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()),
|
cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()),
|
||||||
@ -174,11 +176,11 @@ public class DomainTest {
|
|||||||
assertTrue("Domain name should be exampleupdate.de but is " + row.get("name"), "exampleupdate.de".equals(row.get("name")));
|
assertTrue("Domain name should be exampleupdate.de but is " + row.get("name"), "exampleupdate.de".equals(row.get("name")));
|
||||||
assertTrue("ValidSubdomainNames should be www2 but is " + row.get("validsubdomainnames"), "www2".equals(row.get("validsubdomainnames")));
|
assertTrue("ValidSubdomainNames should be www2 but is " + row.get("validsubdomainnames"), "www2".equals(row.get("validsubdomainnames")));
|
||||||
Object[] domainoptions = (Object[]) row.get("domainoptions");
|
Object[] domainoptions = (Object[]) row.get("domainoptions");
|
||||||
String options = "";
|
String[] checkDomainOptions = Arrays.asList(domainoptions).toArray(new String[0]);
|
||||||
for (Object option: domainoptions) {
|
Arrays.sort(newDomainOptions);
|
||||||
options += option + " ";
|
Arrays.sort(checkDomainOptions);
|
||||||
}
|
assertTrue("Domainoptions should be " + Arrays.toString(newDomainOptions) + " but are " + Arrays.toString(checkDomainOptions),
|
||||||
assertTrue("Domainoptions should be greylisting letsencrypt but are " + options, "greylisting letsencrypt ".equals(options));
|
Arrays.toString(newDomainOptions).equals(Arrays.toString(checkDomainOptions)));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fail("Map<?, ?> expected");
|
fail("Map<?, ?> expected");
|
||||||
|
Loading…
Reference in New Issue
Block a user