feat: 不要なコンフィグを削除

This commit is contained in:
usbharu 2023-10-23 12:50:25 +09:00
parent 004aad7dea
commit e869fad11d
3 changed files with 2 additions and 8 deletions

View File

@ -1,8 +1,5 @@
package dev.usbharu.hideout.config
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
@Deprecated("Config is deprecated")
object Config {
var configData: ConfigData = ConfigData()
@ -12,6 +9,5 @@ object Config {
data class ConfigData(
val url: String = "",
val domain: String = url.substringAfter("://").substringBeforeLast(":"),
val objectMapper: ObjectMapper = jacksonObjectMapper(),
val characterLimit: CharacterLimit = CharacterLimit()
)

View File

@ -23,7 +23,6 @@ import org.junit.jupiter.api.Test
import org.mockito.Mockito.anyLong
import org.mockito.Mockito.eq
import org.mockito.kotlin.*
import utils.JsonObjectMapper
import utils.JsonObjectMapper.objectMapper
import utils.TestApplicationConfig.testApplicationConfig
import java.time.Instant
@ -123,7 +122,7 @@ class APNoteServiceImplTest {
val mediaQueryService = mock<MediaQueryService> {
onBlocking { findByPostId(anyLong()) } doReturn emptyList()
}
Config.configData = ConfigData(objectMapper = JsonObjectMapper.objectMapper)
Config.configData = ConfigData()
val httpClient = HttpClient(
MockEngine { httpRequestData ->
assertEquals("https://follower.example.com/inbox", httpRequestData.url.toString())

View File

@ -23,7 +23,6 @@ import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import org.mockito.ArgumentMatchers.anyString
import org.mockito.kotlin.*
import utils.JsonObjectMapper
import utils.JsonObjectMapper.objectMapper
import utils.TestTransaction
import java.time.Instant
@ -80,7 +79,7 @@ class APReceiveFollowServiceImplTest {
@Test
fun `receiveFollowJob フォロー受付処理のJob`() = runTest {
Config.configData = ConfigData(objectMapper = JsonObjectMapper.objectMapper)
Config.configData = ConfigData()
val person = Person(
type = emptyList(),
name = "follower",