From 73202e34c1e51e839dafbf283b1c2123264065d0 Mon Sep 17 00:00:00 2001 From: Shinsuke Sugaya Date: Thu, 9 May 2024 18:48:04 +0900 Subject: [PATCH] fix #2814 Refactor authentication property key to AUTHENTICATIONS_PROPERTY in DataConfig and WebConfig --- .../org/codelibs/fess/es/config/exentity/DataConfig.java | 3 +-- .../java/org/codelibs/fess/es/config/exentity/WebConfig.java | 2 +- .../org/codelibs/fess/es/config/exentity/WebConfigTest.java | 5 +++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/codelibs/fess/es/config/exentity/DataConfig.java b/src/main/java/org/codelibs/fess/es/config/exentity/DataConfig.java index 6b439480a..548a61bbe 100644 --- a/src/main/java/org/codelibs/fess/es/config/exentity/DataConfig.java +++ b/src/main/java/org/codelibs/fess/es/config/exentity/DataConfig.java @@ -174,8 +174,7 @@ public CrawlerClientFactory initializeClientFactory(final Supplier requestHeaderList = requestHeaderService.getRequestHeaderList(getId()); diff --git a/src/test/java/org/codelibs/fess/es/config/exentity/WebConfigTest.java b/src/test/java/org/codelibs/fess/es/config/exentity/WebConfigTest.java index b8273e73e..b8757a289 100644 --- a/src/test/java/org/codelibs/fess/es/config/exentity/WebConfigTest.java +++ b/src/test/java/org/codelibs/fess/es/config/exentity/WebConfigTest.java @@ -26,6 +26,7 @@ import org.codelibs.fess.app.service.WebAuthenticationService; import org.codelibs.fess.crawler.client.CrawlerClientFactory; import org.codelibs.fess.crawler.client.http.Authentication; +import org.codelibs.fess.crawler.client.http.HcHttpClient; import org.codelibs.fess.helper.SystemHelper; import org.codelibs.fess.mylasta.direction.FessConfig; import org.codelibs.fess.mylasta.direction.FessProp; @@ -100,7 +101,7 @@ public void setInitParameterMap(final Map params) { assertNotNull(initParamMap); assertEquals(0, ((org.codelibs.fess.crawler.client.http.RequestHeader[]) initParamMap.get("requestHeaders")).length); assertEquals("Mozilla/5.0 (compatible; Fess/98.76; +http://fess.codelibs.org/bot.html)", initParamMap.get("userAgent")); - assertEquals(0, ((Authentication[]) initParamMap.get("basicAuthentications")).length); + assertEquals(0, ((Authentication[]) initParamMap.get(HcHttpClient.AUTHENTICATIONS_PROPERTY)).length); assertTrue(Boolean.valueOf(initParamMap.get("robotsTxtEnabled").toString()).booleanValue()); } @@ -173,7 +174,7 @@ public void setInitParameterMap(final Map params) { assertNotNull(initParamMap); assertEquals(0, ((org.codelibs.fess.crawler.client.http.RequestHeader[]) initParamMap.get("requestHeaders")).length); assertEquals(userAgent, initParamMap.get("userAgent")); - assertEquals(0, ((Authentication[]) initParamMap.get("basicAuthentications")).length); + assertEquals(0, ((Authentication[]) initParamMap.get(HcHttpClient.AUTHENTICATIONS_PROPERTY)).length); assertFalse(Boolean.valueOf(initParamMap.get("robotsTxtEnabled").toString()).booleanValue()); } }