Skip to content

Commit

Permalink
Merge branch 'main' into podman-support
Browse files Browse the repository at this point in the history
  • Loading branch information
SoMuchForSubtlety authored Oct 11, 2022
2 parents 6c0c8b7 + 914769f commit 9c66c79
Show file tree
Hide file tree
Showing 100 changed files with 499 additions and 202 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Before submitting a `bug`, please make sure there is no existing issue for the one you encountered.
Thanks for taking the time to fill out this bug report! Before submitting a `bug`, please make sure there is no existing issue for the one you encountered and it has been discussed with the team via [discussions](https://github.com/testcontainers/testcontainers-java/discussions) or Slack.
- type: dropdown
id: module
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/enhancement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ body:
- type: markdown
attributes:
value: |
Before submitting an `enhancement`, please make sure there is no existing enhancement for the one you are requesting. If so, please provide the following information:
Before submitting an `enhancement`, please make sure there is no existing enhancement for the one you are requesting and it has been discussed with the team via [discussions](https://github.com/testcontainers/testcontainers-java/discussions) or Slack. If so, please provide the following information:
- type: dropdown
id: module
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ body:
- type: markdown
attributes:
value: |
Before submitting a `feature`, please make sure there is no existing feature for the one you are requesting. If so, please provide the following information:
Before submitting a `feature`, please make sure there is no existing feature for the one you are requesting and it has been discussed with the team via [discussions](https://github.com/testcontainers/testcontainers-java/discussions) or Slack. If so, please provide the following information:
- type: dropdown
id: module
attributes:
Expand Down
35 changes: 35 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ updates:
schedule:
interval: "monthly"
open-pull-requests-limit: 10
ignore:
- dependency-name: "org.slf4j:slf4j-api"
update-types: [ "version-update:semver-major" ]
- package-ecosystem: "gradle"
directory: "/"
allow:
Expand All @@ -32,6 +35,9 @@ updates:
schedule:
interval: "monthly"
open-pull-requests-limit: 10
ignore:
- dependency-name: "io.dropwizard.metrics:metrics-core"
update-types: [ "version-update:semver-major" ]
- package-ecosystem: "gradle"
directory: "/modules/clickhouse"
schedule:
Expand Down Expand Up @@ -97,6 +103,9 @@ updates:
schedule:
interval: "monthly"
open-pull-requests-limit: 10
ignore:
- dependency-name: "org.apache.tomcat:tomcat-jdbc"
update-types: [ "version-update:semver-minor" ]
- package-ecosystem: "gradle"
directory: "/modules/junit-jupiter"
schedule:
Expand All @@ -107,6 +116,9 @@ updates:
schedule:
interval: "monthly"
open-pull-requests-limit: 10
ignore:
- dependency-name: "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml"
update-types: [ "version-update:semver-minor" ]
- package-ecosystem: "gradle"
directory: "/modules/kafka"
schedule:
Expand All @@ -122,6 +134,9 @@ updates:
schedule:
interval: "monthly"
open-pull-requests-limit: 10
ignore:
- dependency-name: "org.mariadb:r2dbc-mariadb"
update-types: [ "version-update:semver-minor" ]
- package-ecosystem: "gradle"
directory: "/modules/mockserver"
schedule:
Expand All @@ -147,6 +162,9 @@ updates:
schedule:
interval: "monthly"
open-pull-requests-limit: 10
ignore:
- dependency-name: "org.neo4j.driver:neo4j-java-driver"
update-types: [ "version-update:semver-major" ]
- package-ecosystem: "gradle"
directory: "/modules/nginx"
schedule:
Expand Down Expand Up @@ -182,6 +200,9 @@ updates:
schedule:
interval: "monthly"
open-pull-requests-limit: 10
ignore:
- dependency-name: "io.r2dbc:r2dbc-spi"
versions: ["0.8.x"]
- package-ecosystem: "gradle"
directory: "/modules/rabbitmq"
schedule:
Expand All @@ -202,6 +223,9 @@ updates:
schedule:
interval: "monthly"
open-pull-requests-limit: 10
ignore:
- dependency-name: "org.apache.solr:solr-solrj"
update-types: [ "version-update:semver-major" ]
- package-ecosystem: "gradle"
directory: "/modules/spock"
schedule:
Expand Down Expand Up @@ -234,6 +258,17 @@ updates:
schedule:
interval: "monthly"
open-pull-requests-limit: 10
ignore:
- dependency-name: "ch.qos.logback:logback-classic"
update-types: [ "version-update:semver-minor" ]
- dependency-name: "org.apache.solr:solr-solrj"
update-types: [ "version-update:semver-major" ]
- dependency-name: "org.neo4j.driver:neo4j-java-driver"
update-types: [ "version-update:semver-major" ]
- dependency-name: "org.testng:testng"
update-types: [ "version-update:semver-minor" ]
- dependency-name: "org.slf4j:slf4j-api"
update-types: [ "version-update:semver-major" ]

# GitHub Actions
- package-ecosystem: "github-actions"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-docker-wormhole.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI-Docker-Wormhole

on:
pull_request: {}
push: { branches: [ master ] }
push: { branches: [ main ] }

permissions:
contents: read
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI-Examples

on:
pull_request: {}
push: { branches: [ master ] }
push: { branches: [ main ] }

env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand All @@ -25,7 +25,7 @@ jobs:
java-version: '8.0.302'
distribution: temurin
- name: Cache Gradle Home files
uses: actions/[email protected].8
uses: actions/[email protected].9
continue-on-error: true
with:
path: ~/.gradle/caches
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
java-version: '8.0.302'
distribution: temurin
- name: Cache Gradle Home files
uses: actions/[email protected].8
uses: actions/[email protected].9
continue-on-error: true
with:
path: ~/.gradle/caches
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-rootless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI-Docker-Rootless

on:
pull_request: {}
push: { branches: [ master ] }
push: { branches: [ main ] }

permissions:
contents: read
Expand Down
28 changes: 5 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
pull_request: {}
push: { branches: [ master ] }
push: { branches: [ main ] }

permissions:
contents: read
Expand All @@ -14,14 +14,6 @@ env:
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}

jobs:
thundra_test_initializer:
runs-on: ubuntu-latest
outputs:
thundra_agent_testrun_id: ${{ steps.thundra_test_initializer.outputs.thundra_agent_testrun_id }}
steps:
- uses: actions/checkout@v3
- id: thundra_test_initializer
uses: thundra-io/thundra-test-init-action@v1
find_gradle_jobs:
runs-on: ubuntu-18.04
outputs:
Expand All @@ -33,7 +25,7 @@ jobs:
java-version: '8.0.302'
distribution: temurin
- name: Cache Gradle Home files
uses: actions/[email protected].8
uses: actions/[email protected].9
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-home-testmatrix-${{ hashFiles('**/*.gradle') }}
Expand All @@ -47,7 +39,7 @@ jobs:
echo $TASKS
echo "::set-output name=matrix::{\"gradle_args\":$TASKS}"
check:
needs: [find_gradle_jobs, thundra_test_initializer]
needs: [find_gradle_jobs]
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.find_gradle_jobs.outputs.matrix) }}
Expand All @@ -59,23 +51,13 @@ jobs:
java-version: '8.0.302'
distribution: temurin
- name: Cache Gradle Home files
uses: actions/[email protected].8
uses: actions/[email protected].9
continue-on-error: true
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-home-${{matrix.gradle_args}}_check-${{ hashFiles('**/*.gradle') }}
- name: Clear existing docker image cache
run: docker image prune -af
- name: Thundra Gradle Test Instrumentation
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: thundra-io/thundra-gradle-test-action@v1
with:
apikey: ${{ secrets.THUNDRA_API_KEY }}
project_id: ${{ secrets.THUNDRA_PROJECT_ID }}
- name: Build and test with Gradle (${{matrix.gradle_args}})
run: |
./gradlew --no-daemon --continue --scan ${{matrix.gradle_args}} \
$([[ -f $THUNDRA_GRADLE_INIT_SCRIPT_PATH ]] && echo "--init-script $THUNDRA_GRADLE_INIT_SCRIPT_PATH")
env:
THUNDRA_AGENT_TEST_RUN_ID: ${{ needs.thundra_test_initializer.outputs.thundra_agent_testrun_id }}
THUNDRA_AGENT_REPORT_REST_BASEURL: https://collector.thundra.us/v1
./gradlew --no-daemon --continue --scan ${{matrix.gradle_args}}
4 changes: 2 additions & 2 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release Drafter
on:
push:
branches:
- master
- main
pull_request:
types: [opened, reopened, synchronize]

Expand All @@ -18,6 +18,6 @@ jobs:
if: github.repository == 'testcontainers/testcontainers-java'
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@06a49bf28488e030d35ca2ac6dbf7f408a481779 # v5.19.0
- uses: release-drafter/release-drafter@df69d584deac33d8569990cb6413f82447181076 # v5.19.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/update-docs-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
ref: master
ref: main
- name: Update latest_version property in mkdocs.yml
run: |
sed -i "s/latest_version: .*/latest_version: ${GITHUB_REF##*/}/g" mkdocs.yml
git diff
- name: Create Pull Request
uses: peter-evans/create-pull-request@18f90432bedd2afd6a825469ffd38aa24712a91d # v3.10.1
uses: peter-evans/create-pull-request@671dc9c9e0c2d73f07fa45a3eb0220e1622f0c5f # v3.10.1
with:
title: Update docs version to ${GITHUB_REF##*/}
body: |
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ dependency-reduced-pom.xml
*.iml

## Directory-based project format:
.idea/
.idea/*
!.idea/icon.png
# if you remove the above rule, at least ignore the following:

# User-specific stuff:
Expand Down
Binary file added .idea/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Testcontainers

[![Thundra Foresight](https://thundra-assets-prod.s3.us-west-2.amazonaws.com/images/badges/thundra-foresight-badge-enabled.svg)](https://foresight.thundra.live/testRuns/5a49cc30-f063-11eb-9a03-0242ac130003)
[![Thundra Foresight Test Results](https://foresight.service.thundra.us/public/api/v1/badge/test/5a49cc30-f063-11eb-9a03-0242ac130003)](https://foresight.thundra.live/testRuns/5a49cc30-f063-11eb-9a03-0242ac130003)
[![Revved up by Gradle Enterprise](https://img.shields.io/badge/Revved%20up%20by-Gradle%20Enterprise-06A0CE?logo=Gradle&labelColor=02303A)](https://ge.testcontainers.org/scans)

> Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Testcontainers' release process is semi-automated through GitHub Actions. This d

## Steps

1. Ensure that the master branch is building and that tests are passing.
1. Ensure that the `main` branch is building and that tests are passing.
1. Create a new release on GitHub. **The tag name is used as the version**, so please keep the tag name plain (e.g. 1.2.3).
1. The release triggers a GitHub Action workflow.
1. Log in to [Sonatype](https://oss.sonatype.org/) to check the staging repository.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ subprojects {
}

dependencies {
testImplementation 'ch.qos.logback:logback-classic:1.2.3'
testImplementation 'ch.qos.logback:logback-classic:1.3.3'
}

spotless {
Expand Down
10 changes: 5 additions & 5 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ configurations.all {

dependencies {
api 'junit:junit:4.13.2'
api 'org.slf4j:slf4j-api:2.0.0'
api 'org.slf4j:slf4j-api:1.7.36'
compileOnly 'org.jetbrains:annotations:23.0.0'
testCompileClasspath 'org.jetbrains:annotations:23.0.0'
testCompileOnly 'org.jetbrains:annotations:23.0.0'
api 'org.apache.commons:commons-compress:1.21'
api ('org.rnorth.duct-tape:duct-tape:1.0.8') {
exclude(group: 'org.jetbrains', module: 'annotations')
Expand All @@ -80,18 +80,18 @@ dependencies {

api 'com.github.docker-java:docker-java-transport-zerodep'

shaded "org.yaml:snakeyaml:1.31"
shaded "org.yaml:snakeyaml:1.33"

shaded 'org.glassfish.main.external:trilead-ssh2-repackaged:4.1.2'

shaded 'org.zeroturnaround:zt-exec:1.12'

testImplementation 'org.apache.httpcomponents:httpclient:4.5.9'
testImplementation 'redis.clients:jedis:4.2.3'
testImplementation 'com.rabbitmq:amqp-client:5.15.0'
testImplementation 'com.rabbitmq:amqp-client:5.16.0'
testImplementation 'org.mongodb:mongo-java-driver:3.12.11'

testImplementation ('org.mockito:mockito-core:4.7.0') {
testImplementation ('org.mockito:mockito-core:4.8.0') {
exclude(module: 'hamcrest-core')
}
// Synthetic JAR used for MountableFileTest and DirectoryTarResourceTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ public static synchronized ResourceReaper instance() {
//noinspection deprecation
instance = new RyukResourceReaper();
} else {
String ryukDisabledMessage =
"\n" +
"********************************************************************************" +
"\n" +
"Ryuk has been disabled. This can cause unexpected behavior in your environment." +
"\n" +
"********************************************************************************";
LOGGER.warn(ryukDisabledMessage);

instance = new JVMHookResourceReaper();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,10 @@ private String getConfigurable(
}

if (environment.containsKey(envVarName)) {
return environment.get(envVarName);
String value = environment.get(envVarName);
if (!value.isEmpty()) {
return value;
}
}

for (final Properties properties : propertiesSources) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ public void shouldReadDockerSettingsFromUserProperties() {
.isEqualTo("some value");
}

@Test
public void shouldNotReadSettingIfCorrespondingEnvironmentVarIsEmptyString() {
environment.put("DOCKER_FOO", "");
assertThat(newConfig().getEnvVarOrUserProperty("docker.foo", "default"))
.as("reads unprefixed env vars for docker. settings")
.isEqualTo("default");
}

@Test
public void shouldNotReadDockerClientStrategyFromClasspathProperties() {
String currentValue = newConfig().getDockerClientStrategyClassName();
Expand Down
Loading

0 comments on commit 9c66c79

Please sign in to comment.