How to disable security feature for Unit testing in Spring Webflux

Viewed 284

My Unit tests are passed already. After I added the Security with JWT token, the passed unit tests are failed cos of Security features. I would like to disable security features for unit tests. I don't want to rewrite all the test cases.

Can I disable the security features for unit tests?

I used Spring Boot 2.1.1, Webflux, and RouterFunction instead of controller.

1 Answers

I don't know this is best solution or not. I generated unexpired token and used it in My unit test cases.

Related