Skip to content

Commit

Permalink
Remove logger for tests and add key for mvn test
Browse files Browse the repository at this point in the history
  • Loading branch information
bifrurcated committed Jan 14, 2024
1 parent 88d28a5 commit 9a611d2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
java-version: 17

- name: Run tests
run: mvn test
run: mvn test --batch-mode --fail-at-end

- name: JUnit Report Action
uses: mikepenz/action-junit-report@v4.0.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
Expand All @@ -28,7 +26,6 @@
@AutoConfigureMockMvc
@ActiveProfiles("test")
class WalletControllerTest {
private static final Logger logger = LoggerFactory.getLogger(WalletControllerTest.class);
private static final String END_POINT_PATH = "/api/v1";
@Autowired
private MockMvc mockMvc;
Expand Down Expand Up @@ -77,7 +74,6 @@ record WalletResponse(UUID id, Float amount) {}
.andDo(print())
.andExpect(status().isOk())
.andExpect(content().json(response));
logger.info("Test passed");
}
@Test
public void testWalletDepositNotFound() throws Exception {
Expand All @@ -90,7 +86,6 @@ record WalletRequest(UUID valletId, String operationType, Float amount){}
.content(requestBody))
.andDo(print())
.andExpect(status().isNotFound());
logger.info("Test passed");
}

@Test
Expand All @@ -111,7 +106,6 @@ record WalletResponse(UUID id, Float amount) {}
.andDo(print())
.andExpect(status().isOk())
.andExpect(content().json(response));
logger.info("Test passed");
}

@Test
Expand All @@ -127,7 +121,6 @@ record WalletRequest(UUID valletId, String operationType, Float amount){}
.content(requestBody))
.andDo(print())
.andExpect(status().isPaymentRequired());
logger.info("Test passed");
}

@Test
Expand All @@ -141,7 +134,6 @@ record WalletRequest(UUID valletId, String operationType, Float amount){}
.content(requestBody))
.andDo(print())
.andExpect(status().isUnsupportedMediaType());
logger.info("Test passed");
}

@Test
Expand All @@ -154,7 +146,6 @@ record BalanceResponse(Float amount){}
.andDo(print())
.andExpect(status().isOk())
.andExpect(content().json(response));
logger.info("Test passed");
}

@Test
Expand All @@ -163,6 +154,5 @@ public void testWalletGetAmountNotFound() throws Exception {
this.mockMvc.perform(get(END_POINT_PATH+"/wallets/"+id))
.andDo(print())
.andExpect(status().isNotFound());
logger.info("Test passed");
}
}

0 comments on commit 9a611d2

Please sign in to comment.