Для того чтобы их прикрутить надо:
1. Не забыть добавить зависимость
testImplementation("org.springframework.security:spring-security-test")2. Донастроить webTestClient:
client = MockMvcWebTestClient
.bindToApplicationContext(applicationContext)
.apply(springSecurity(FilterChainProxy(securityFilterChain)))
.configureClient()
.defaultHeader("Content-Type", "application/json")
.build()
Возможно там где-то дальше ещё какие-то грабли есть, но меня утешает мысль, что вернуться к тестам через HTTP можно будет лёгким движением руки
#ergo_testing@ergonomic_code #tdd@ergonomic_code #mockmvc@ergonomic_code #springsecurity@ergonomic_code #webtestclient@ergonomic_code