New domain options and properties for Debian Bookworm #1

Closed
hsh-timotheuspokorra wants to merge 41 commits from TP-202311-vhost-bookworm into rel_4.0
Showing only changes of commit 643b23ad34 - Show all commits

View File

@ -135,13 +135,12 @@ public class DomainTest {
Map<?, ?> row = (Map<?, ?>) o;
assertTrue("Domain name should be exampleupdate.de but is " + row.get("name"), "exampleupdate.de".equals(row.get("name")));
assertTrue("ValidSubdomainNames should be * but is " + row.get("validsubdomainnames"), "*".equals(row.get("validsubdomainnames")));
Object[] domainoptions = (Object[]) row.get("domainoptions");
String options = "";
for (Object option: domainoptions) {
options += option + " ";
}
String defaultDomainOptions = "htdocsfallback indexes dkim autoconfig greylisting includes letsencrypt multiviews ";
assertTrue("Domainoptions should be " + defaultDomainOptions + " but are " + options, defaultDomainOptions.equals(options));
String[] checkDomainOptions = Arrays.asList((Object[]) row.get("domainoptions")).toArray(new String[0]);
String[] expectedDomainOptions = new String[] {"htdocsfallback", "indexes", "dkim", "autoconfig", "greylisting", "includes", "letsencrypt", "multiviews"};
Arrays.sort(expectedDomainOptions);
Arrays.sort(checkDomainOptions);
assertTrue("Domainoptions should be " + Arrays.toString(expectedDomainOptions) + " but are " + Arrays.toString(checkDomainOptions),
Arrays.toString(expectedDomainOptions).equals(Arrays.toString(checkDomainOptions)));
}
else {
fail("Map<?, ?> expected");
@ -175,8 +174,7 @@ public class DomainTest {
Map<?, ?> row = (Map<?, ?>) o;
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")));
Object[] domainoptions = (Object[]) row.get("domainoptions");
String[] checkDomainOptions = Arrays.asList(domainoptions).toArray(new String[0]);
String[] checkDomainOptions = Arrays.asList((Object[]) row.get("domainoptions")).toArray(new String[0]);
Arrays.sort(newDomainOptions);
Arrays.sort(checkDomainOptions);
assertTrue("Domainoptions should be " + Arrays.toString(newDomainOptions) + " but are " + Arrays.toString(checkDomainOptions),