Skip to content

Commit

Permalink
fix(deps): Replace testcontainers/mockserver with wiremock and update…
Browse files Browse the repository at this point in the history
… cdxgen to 10.8.8
  • Loading branch information
heubeck committed Jul 23, 2024
1 parent 7fe328c commit be65d93
Show file tree
Hide file tree
Showing 9 changed files with 245 additions and 293 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

env:
CDXGEN_VERSION: '10.8.7'
CDXGEN_VERSION: '10.8.8'
CDXGEN_PLUGINS_VERSION: '1.6.3'
GRYPE_VERSION: 'v0.79.3'
SBOMQS_VERSION: 'v0.1.7'
Expand Down Expand Up @@ -116,7 +116,6 @@ jobs:
QUARKUS_GITHUB_APP_WEBHOOK_SECRET: for-my-eyes-only
QUARKUS_GITHUB_APP_PRIVATE_KEY: ''
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DTRACK_APIKEY: theres-nothing-to-see-here
run: |
if [ -n "$sem_ver" ]; then
mvn ${{ env.mvn_parameter }} versions:set -DnewVersion="$sem_ver"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,4 @@ jobs:
QUARKUS_GITHUB_APP_WEBHOOK_SECRET: for-my-eyes-only
QUARKUS_GITHUB_APP_PRIVATE_KEY: ''
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DTRACK_APIKEY: theres-nothing-to-see-here
run: mvn ${{ env.mvn_parameter }} clean verify
39 changes: 18 additions & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
<!-- test -->
<assertj.version>3.26.3</assertj.version>
<awaitility.version>4.2.1</awaitility.version>
<quarkus-wiremock.version>1.3.3</quarkus-wiremock.version>

<testcontainers.version>1.20.0</testcontainers.version>
<!-- must be same as server version bundled in org.testcontainers.mockserver -->
<mockserver.version>5.13.2</mockserver.version>
<!-- provided -->
<jetbrains-annotations.version>24.1.0</jetbrains-annotations.version>

<skipITs>true</skipITs>
<surefire-plugin.version>3.3.1</surefire-plugin.version>
Expand All @@ -46,13 +46,6 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>${testcontainers.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -136,19 +129,15 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
<groupId>io.quarkiverse.wiremock</groupId>
<artifactId>quarkus-wiremock</artifactId>
<version>${quarkus-wiremock.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mockserver</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mock-server</groupId>
<artifactId>mockserver-client-java</artifactId>
<version>${mockserver.version}</version>
<groupId>io.quarkiverse.wiremock</groupId>
<artifactId>quarkus-wiremock-test</artifactId>
<version>${quarkus-wiremock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -161,6 +150,14 @@
<artifactId>quarkus-jacoco</artifactId>
<scope>test</scope>
</dependency>

<!-- provided -->
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>${jetbrains-annotations.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ github.token=${GITHUB_TOKEN: }

dtrack.apikey=${DTRACK_APIKEY: }
dtrack.url=${DTRACK_URL: }
%test.dtrack.apikey=test-dtrack-api-key
%test.dtrack.url=http://localhost:${quarkus.wiremock.devservices.port}

cdxgen.fail_on_error=${CDXGEN_FAIL_ON_ERROR:true}
cdxgen.use_gosum=${CDXGEN_USE_GOSUM:false}
Expand Down Expand Up @@ -44,7 +46,6 @@ app.allowed_env_substitutions=${ALLOWED_ENV_SUBSTITUTIONS: }
app.enabled_repos=${APP_ENABLED_REPOS: }
app.analysis_timeout=${APP_ANALYSIS_TIMEOUT:60M}
app.analysis.cdxgen.fetch_licenses=${APP_ANALYSIS_CDXGEN_FETCH_LICENSES:true}
%test.app.analysis.cdxgen.fetch_licenses=false

app.pull_requests.ignore_bots=${APP_PULL_REQUESTS_IGNORE_BOTS:true}
app.pull_requests.enabled=${APP_PULL_REQUESTS_ENABLED:true}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@

import io.smallrye.mutiny.Uni;
import io.smallrye.mutiny.helpers.test.UniAssertSubscriber;
import org.testcontainers.images.ParsedDockerfile;
import org.testcontainers.utility.DockerImageName;
import org.testcontainers.utility.MountableFile;

import java.net.URI;
import java.net.URL;
import java.nio.file.Path;
import java.time.Duration;
import java.util.function.Consumer;
import java.util.logging.Level;
Expand All @@ -27,11 +23,6 @@ static <T> T await(Uni<T> uni) {
return uas.getItem();
}

static DockerImageName fromDockerfile(String dockerfile) {
var resolvedDockerfile = new ParsedDockerfile(Path.of(MountableFile.forClasspathResource("testcontainers/" + dockerfile).getResolvedPath()));
return DockerImageName.parse(resolvedDockerfile.getDependencyImageNames().iterator().next());
}

static <T> Consumer<T> ignore() {
return any -> {
};
Expand Down
Loading

0 comments on commit be65d93

Please sign in to comment.