Fixed the username validator and KustvaktCoreRestTest initMethod.
Change-Id: I2d2547e5aabb0766917c32e4d7ae01b196176f7a
diff --git a/src/main/resources/validation.properties b/src/main/resources/validation.properties
index a38ae80..0a8f4f0 100644
--- a/src/main/resources/validation.properties
+++ b/src/main/resources/validation.properties
@@ -33,5 +33,6 @@
# Validator.string=^[\\.;:,\\=&\\*\\/\\/_()\\[\\]@\\|\\-0-9\\p{L}\\p{Space}]{0,1024}$
#Validator.username=^[A-Za-z_.\\d]{6,15}$ by Hanl
-Validator.username=^[A-Za-z_.\\d]{3,20}$ # 21.04.17/FB
+# 21.04.17/FB
+Validator.username=^[A-Za-z_.\\d]{3,20}$
Validator.password=^((?=.*\\d)(?=.*[A-Za-z])(?!.*[\\(\\)-]).{8,20})$
\ No newline at end of file
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktCoreRestTest.java b/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktCoreRestTest.java
index c36e48f..4c2b8fa 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktCoreRestTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/full/KustvaktCoreRestTest.java
@@ -19,10 +19,16 @@
*/
public class KustvaktCoreRestTest extends FastJerseyTest {
+ @Override
+ public void initMethod () throws KustvaktException {
+// helper().setupAccount();
+ helper().runBootInterfaces();
+ }
+
@BeforeClass
public static void configure () {
- // FastJerseyTest.setPackages("de.ids_mannheim.korap.web.service.light", version hanl
+// FastJerseyTest.setPackages("de.ids_mannheim.korap.web.service.light", // version hanl
FastJerseyTest.setPackages("de.ids_mannheim.korap.web.service.full", // volle Version FB
"de.ids_mannheim.korap.web.filter",
"de.ids_mannheim.korap.web.utils");
@@ -117,10 +123,5 @@
.queryParam("page", "1").get(ClientResponse.class);
System.out.println("RESPONSE " + response.getEntity(String.class));
}
-
-
- @Override
- public void initMethod () throws KustvaktException {
- helper().setupAccount();
- }
+
}
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/full/SearchServiceTest.java b/src/test/java/de/ids_mannheim/korap/web/service/full/SearchServiceTest.java
index bad37ca..126e577 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/full/SearchServiceTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/full/SearchServiceTest.java
@@ -221,10 +221,11 @@
Corpus c = i.next();
if (c.getPersistentID().equals("WPD15")){
id =c.getId().toString();
+ System.out.println(id);
}
}
ClientResponse response = resource().path(getAPIVersion())
- .path("corpus").path("5").path("search")
+ .path("corpus").path(id).path("search")
.queryParam("q", "[orth=das]")
.queryParam("ql", "poliqarp")
.header(Attributes.AUTHORIZATION,