diff --git a/.github/workflows/sonarscan.yml b/.github/workflows/sonarscan.yml index 0ab21cd1c..93d6c7d95 100644 --- a/.github/workflows/sonarscan.yml +++ b/.github/workflows/sonarscan.yml @@ -13,33 +13,9 @@ jobs: sonar: name: Test - SonarCloud Scan runs-on: ubuntu-latest - services: - postgres: - image: postgis/postgis:16-3.4 - ports: - - 5432:5432 - env: - POSTGRES_USER: wfprev - POSTGRES_PASSWORD: password - POSTGRES_DB: wfprevdb - options: --health-cmd="pg_isready -U wfprev -d wfprevdb" --health-interval=10s --health-timeout=5s --health-retries=5 - steps: - - uses: actions/checkout@v4 - - - name: Wait for Postgres to be ready - run: | - for i in {1..30}; do - if pg_isready -h postgres -p 5432 -U wfprev -d wfprevdb; then - echo "Postgres is ready!" - break - fi - echo "Waiting for Postgres..." - sleep 2 - done - - name: Set up JDK 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v4 with: java-version: 17 distribution: 'adopt' diff --git a/server/wfprev-api/pom.xml b/server/wfprev-api/pom.xml index c69265b5c..47b7f9468 100644 --- a/server/wfprev-api/pom.xml +++ b/server/wfprev-api/pom.xml @@ -204,8 +204,18 @@ sonar-maven-plugin 4.0.0.4121 + + javax.xml.bind + jaxb-api + 2.3.1 + + + org.glassfish.jaxb + jaxb-runtime + 2.3.1 + - + diff --git a/server/wfprev-api/src/test/java/ca/bc/gov/nrs/wfprev/ExampleControllerTest.java b/server/wfprev-api/src/test/java/ca/bc/gov/nrs/wfprev/ExampleControllerTest.java index 198bf16fb..90c89ec30 100644 --- a/server/wfprev-api/src/test/java/ca/bc/gov/nrs/wfprev/ExampleControllerTest.java +++ b/server/wfprev-api/src/test/java/ca/bc/gov/nrs/wfprev/ExampleControllerTest.java @@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.context.annotation.Import; import org.springframework.hateoas.CollectionModel; import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; @@ -23,6 +24,7 @@ import ca.bc.gov.nrs.wfprev.data.resources.ExampleModel; import ca.bc.gov.nrs.wfprev.services.ExampleService; +@Import(TestcontainersConfiguration.class) @SpringBootTest @AutoConfigureMockMvc class ExampleControllerTest {