Skip to content

Commit

Permalink
Update echo-server, cleanup test constants
Browse files Browse the repository at this point in the history
  • Loading branch information
gesellix committed Dec 20, 2023
1 parent 70a6e95 commit 52f396d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ class DockerContainerIntegrationSpec extends Specification {
new Thread({
dockerClient.logs(containerId, [tail: 1], callback, Duration.of(5, ChronoUnit.SECONDS))
}).start()
latch.await(5, SECONDS)
latch.await(6, SECONDS)
then:
!logs.empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,73 +15,35 @@ class TestConstants {
static TestConstants CONSTANTS = new TestConstants()

TestConstants() {
// docker inspect --format "{{ json .Created }}, Id: {{ json .Id }}, Digests: {{ json .RepoDigests }}" gesellix/echo-server:2023-07-02T12-00-00
// docker inspect --format "{{ json .Created }}, Id: {{ json .Id }}, Digests: {{ json .RepoDigests }}" gesellix/echo-server:2023-12-19T09-50-00
if (LocalDocker.isNativeWindows()) {
imageDigest = "gesellix/echo-server@sha256:b1bc3f701f99f827b6d5ab674dec266e6c4bad596d34b5cec6d5011b760477fd"
imageId = "sha256:6d623c7eb0e997b059b859eb0b642cee64d26b7e19973434bf9b21b679819a1e"
imageCreated = 1688292307
imageDigest = "gesellix/echo-server@sha256:838c203a87cc711eb182d6f8fed10fe6894cdc70fe3dedd0dc1e6111987836b5"
imageId = "sha256:3b98f60f6aee437e6a82470c4bdb0216ce512d162e218081cb7cd5d3977ba582"
imageCreated = 1702976162
volumeTarget = "C:/my-volume"
}
else {
imageDigest = "gesellix/echo-server@sha256:b1bc3f701f99f827b6d5ab674dec266e6c4bad596d34b5cec6d5011b760477fd"
imageId = "sha256:c1addd5b4650fb92f02484236b5d4621b3021b364eaa1f73fcf7961631bc8a49"
imageCreated = 1688292215
} else {
imageDigest = "gesellix/echo-server@sha256:838c203a87cc711eb182d6f8fed10fe6894cdc70fe3dedd0dc1e6111987836b5"
imageId = "sha256:838c203a87cc711eb182d6f8fed10fe6894cdc70fe3dedd0dc1e6111987836b5"
imageCreated = 1702975999
volumeTarget = "/my-volume"
}
imageRepo = "gesellix/echo-server"
imageTag = "2023-07-02T12-00-00"
imageTag = "2023-12-19T09-50-00"
imageName = "$imageRepo:$imageTag"

if (System.getenv("GITHUB_ACTOR")) {
// TODO consider checking the Docker api version instead of "GITHUB_ACTOR"
if (LocalDocker.isNativeWindows()) {
versionDetails = [
ApiVersion : { it == "1.40" },
Arch : { it == "amd64" },
BuildTime : { it == "12/17/2020 19:29:00" },
GitCommit : { it == "57e3a05525" },
GoVersion : { it == "go1.13.15" },
KernelVersion: { it =~ "\\d.\\d{1,2}.\\d{1,2}\\w*" },
MinAPIVersion: { it == "1.24" },
Os : { it == "windows" },
Version : { it =~ "\\d{1,2}.\\d{1,2}.\\d{1,2}\\w*" }]
}
else {
versionDetails = [
ApiVersion : { it == "1.41" },
Arch : { it == "amd64" },
BuildTime : { it == "2021-01-28T21:33:12.000000000+00:00" },
GitCommit : { it == "46229ca1d815cfd4b50eb377ac75ad8300e13a85" },
GoVersion : { it == "go1.13.15" },
KernelVersion: { it =~ "\\d.\\d{1,2}.\\d{1,2}\\w*" },
MinAPIVersion: { it == "1.12" },
Os : { it == "linux" },
Version : { it =~ "\\d{1,2}.\\d{1,2}.\\d{1,2}\\w*" }]
}
}
else if (LocalDocker.isNativeWindows()) {
versionDetails = [
ApiVersion : { it == "1.40" },
Arch : { it == "amd64" },
BuildTime : { it == "2020-09-16T17:14:20.000000000+00:00" },
GitCommit : { it == "4484c46d9d" },
GoVersion : { it == "go1.13.15" },
KernelVersion: { it =~ "\\d.\\d{1,2}.\\d{1,2}\\w*" },
MinAPIVersion: { it == "1.24" },
Os : { it == "windows" },
Version : { it =~ "\\d{1,2}.\\d{1,2}.\\d{1,2}\\w*" }]
}
else {
versionDetails = [
ApiVersion : { it == "1.41" },
Arch : { it == "amd64" },
BuildTime : { it == "2020-12-28T16:15:28.000000000+00:00" },
GitCommit : { it == "8891c58" },
GoVersion : { it == "go1.13.15" },
KernelVersion: { it =~ "\\d.\\d{1,2}.\\d{1,2}\\w*" },
MinAPIVersion: { it == "1.12" },
Os : { it == "linux" },
Version : { it =~ "\\d{1,2}.\\d{1,2}.\\d{1,2}\\w*" }]
versionDetails = [
ApiVersion : { it in ["1.43", "1.44"] },
Arch : { it in ["amd64", "arm64"] },
BuildTime : { it =~ "\\d{4}-\\d{2}-\\d{2}T\\w+" },
GitCommit : { it =~ "\\w{6,}" },
GoVersion : { it =~ "go\\d+.\\d+.\\d+" },
KernelVersion: { it =~ "\\d.\\d{1,2}.\\d{1,2}\\w*" },
MinAPIVersion: { it == "1.12" },
Os : { it == "linux" },
Version : { it == "master" || it =~ "\\d{1,2}.\\d{1,2}.\\d{1,2}\\w*" }]
if (LocalDocker.isNativeWindows()) {
versionDetails.MinAPIVersion = { it == "1.24" }
versionDetails.Os = { it == "windows" }
}
}
}

0 comments on commit 52f396d

Please sign in to comment.