Skip to content

Commit 92ec68f

Browse files
committed
fix: add test profile and turn off debug-level log
1 parent 3881393 commit 92ec68f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/main/resources/application.properties

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ spring.mail.host=localhost
3737
spring.mail.port=1025
3838
spring.mail.properties.mail.smtp.auth=false
3939

40-
logging.level.com.taskagile=DEBUG
41-
logging.level.org.springframework.security=DEBUG
42-
4340
# Actuator setting
4441
management.server.port=9000
4542
management.endpoint.health.show-details=always

src/test/java/com/taskagile/web/apis/RegistrationApiControllerTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
1313
import org.springframework.boot.test.mock.mockito.MockBean;
1414
import org.springframework.http.MediaType;
15+
import org.springframework.test.context.ActiveProfiles;
1516
import org.springframework.test.context.ContextConfiguration;
1617
import org.springframework.test.context.junit4.SpringRunner;
1718
import org.springframework.test.web.servlet.MockMvc;
@@ -25,6 +26,7 @@
2526
@RunWith(SpringRunner.class)
2627
@ContextConfiguration(classes = {SecurityConfiguration.class, RegistrationApiController.class})
2728
@WebMvcTest
29+
@ActiveProfiles("test")
2830
public class RegistrationApiControllerTests {
2931

3032
@Autowired

src/test/java/com/taskagile/web/apis/authenticate/AuthenticationFilterTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88
import org.springframework.security.authentication.AuthenticationManager;
99
import org.springframework.security.authentication.InsufficientAuthenticationException;
1010
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
11+
import org.springframework.test.context.ActiveProfiles;
1112
import org.springframework.test.context.junit4.SpringRunner;
1213

1314
import java.io.IOException;
1415

1516
import static org.mockito.Mockito.verify;
1617

1718
@RunWith(SpringRunner.class)
19+
@ActiveProfiles("test")
1820
public class AuthenticationFilterTests {
1921

2022
@MockBean

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy