aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/juick/config/SecurityConfig.java2
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java16
2 files changed, 10 insertions, 8 deletions
diff --git a/src/main/java/com/juick/config/SecurityConfig.java b/src/main/java/com/juick/config/SecurityConfig.java
index a93a4a5ca..ac61f8f69 100644
--- a/src/main/java/com/juick/config/SecurityConfig.java
+++ b/src/main/java/com/juick/config/SecurityConfig.java
@@ -228,6 +228,7 @@ public class SecurityConfig {
}
@Bean
+ @Order(Ordered.HIGHEST_PRECEDENCE + 1)
SecurityFilterChain h2ConsoleFilterChain(HttpSecurity http) throws Exception {
http.securityMatcher("/h2-console/**")
.authorizeHttpRequests(auth -> auth
@@ -294,6 +295,7 @@ public class SecurityConfig {
}
@Bean
+ @Order(Ordered.HIGHEST_PRECEDENCE + 1)
public SecurityFilterChain securityWebFilterChain(
HttpSecurity http) throws Exception {
return http.securityMatcher("/actuator/**")
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java
index 34e72ec7c..5782475ea 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -22,11 +22,11 @@ import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.gargoylesoftware.htmlunit.CookieManager;
-import com.gargoylesoftware.htmlunit.WebClient;
-import com.gargoylesoftware.htmlunit.css.StyleElement;
-import com.gargoylesoftware.htmlunit.html.DomElement;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import org.htmlunit.CookieManager;
+import org.htmlunit.WebClient;
+import org.htmlunit.css.StyleElement;
+import org.htmlunit.html.DomElement;
+import org.htmlunit.html.HtmlPage;
import com.github.scribejava.apis.AppleClientSecretGenerator;
import com.jayway.jsonpath.JsonPath;
import com.juick.*;
@@ -1701,7 +1701,7 @@ public class ServerTests {
Cookie loginCookie = loginResult.getResponse().getCookie("juick-remember-me");
webClient.setCookieManager(new CookieManager());
webClient.getCookieManager()
- .addCookie(new com.gargoylesoftware.htmlunit.util.Cookie(loginCookie.getDomain(),
+ .addCookie(new org.htmlunit.util.Cookie(loginCookie.getDomain(),
loginCookie.getName(), loginCookie.getValue()));
HtmlPage threadPage = webClient.getPage(String.format(baseUri + "ugnich/%d", mid));
assertThat(threadPage.getWebResponse().getStatusCode(), equalTo(200));
@@ -1798,7 +1798,7 @@ public class ServerTests {
Cookie loginCookie = loginResult.getResponse().getCookie("juick-remember-me");
webClient.setCookieManager(new CookieManager());
webClient.getCookieManager()
- .addCookie(new com.gargoylesoftware.htmlunit.util.Cookie(loginCookie.getDomain(),
+ .addCookie(new org.htmlunit.util.Cookie(loginCookie.getDomain(),
loginCookie.getName(), loginCookie.getValue()));
HtmlPage discussions = webClient.getPage(baseUri);
assertThat(discussions.querySelectorAll("article").size(), is(0));
@@ -1890,7 +1890,7 @@ public class ServerTests {
Cookie loginCookie = loginResult.getResponse().getCookie("juick-remember-me");
webClient.setCookieManager(new CookieManager());
webClient.getCookieManager()
- .addCookie(new com.gargoylesoftware.htmlunit.util.Cookie(loginCookie.getDomain(),
+ .addCookie(new org.htmlunit.util.Cookie(loginCookie.getDomain(),
loginCookie.getName(), loginCookie.getValue()));
int mid = messagesService.createMessage(ugnich.getUid(), "new test", null, Set.of());
subscriptionService.subscribeMessage(messagesService.getMessage(mid).get(), freefd);