Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-emilius committed Oct 30, 2024
1 parent c503d56 commit d9e9591
Show file tree
Hide file tree
Showing 10 changed files with 109 additions and 101 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
if: ${{ steps.changed-files-server-folder.outputs.any_changed == 'true' && matrix.path == 'server' }}
working-directory: ./server
run: |
./gradlew test --info
./gradlew test
- name: Log in to the Container registry
if: ${{ (steps.changed-files-client-folder.outputs.any_changed == 'true') || (steps.changed-files-server-folder.outputs.any_changed == 'true') }}
Expand Down
186 changes: 93 additions & 93 deletions client/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
"react-router-dom": "6.27.0"
},
"devDependencies": {
"@eslint/compat": "1.2.1",
"@eslint/compat": "1.2.2",
"@eslint/eslintrc": "3.1.0",
"@eslint/js": "9.13.0",
"@types/react": "18.3.12",
"@types/react-avatar-editor": "^13.0.3",
"@types/react-dom": "18.3.1",
"@typescript-eslint/eslint-plugin": "8.11.0",
"@typescript-eslint/parser": "8.11.0",
"@typescript-eslint/eslint-plugin": "8.12.2",
"@typescript-eslint/parser": "8.12.2",
"clean-webpack-plugin": "4.0.0",
"compression-webpack-plugin": "11.1.0",
"copy-webpack-plugin": "12.0.2",
Expand Down
2 changes: 2 additions & 0 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@ test {
testLogging {
events "PASSED", "FAILED", "SKIPPED"
}

systemProperty 'spring.profiles.active', 'test'
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.springframework.http.MediaType;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.DynamicPropertyRegistry;
import org.springframework.test.context.DynamicPropertySource;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.junit.jupiter.api.*;
import org.springframework.http.MediaType;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.DynamicPropertyRegistry;
import org.springframework.test.context.DynamicPropertySource;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
Expand All @@ -20,6 +21,7 @@
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;

@Testcontainers
@ActiveProfiles("test")
class ThesisControllerTest extends BaseIntegrationTest {
@Container
static PostgreSQLContainer<?> dbContainer = new PostgreSQLContainer<>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.DynamicPropertyRegistry;
import org.springframework.test.context.DynamicPropertySource;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.DynamicPropertyRegistry;
import org.springframework.test.context.DynamicPropertySource;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.springframework.context.annotation.Import;
import org.springframework.http.MediaType;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import thesistrack.ls1.controller.payload.CreateApplicationPayload;
Expand All @@ -23,10 +24,10 @@
import java.util.*;

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ActiveProfiles("test")
@AutoConfigureMockMvc
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@Import(TestSecurityConfig.class)
@ActiveProfiles("test")
public abstract class BaseIntegrationTest {
@Autowired
private ApplicationRepository applicationRepository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
logging:
level:
liquibase: INFO
net.fortuna.ical4j.util.Configurator: INFO
level:
liquibase: INFO
net.fortuna.ical4j.util.Configurator: INFO

spring:
datasource:
Expand Down

0 comments on commit d9e9591

Please sign in to comment.