Skip to content

Commit 490e9d2

Browse files
authored
test: specify docker API version 1.41 for structure test (#2861)
This test was failing at head (#2856) with error "Error response from daemon: client version 1.52 is too new. Maximum supported API version is 1.41" since Dockerfile is pulling 29.0.0. It's likely that the new major version removed some backward-compatibility logic that allowed the client to auto downgrade its API version. The Docker client inside librarian image is too new (1.52) for the Docker server environment (1.41) provided by Cloud Build, pin the version for the test. This change is tested with `gcloud --project=<my-project> builds submit . --config=cloudbuild-test.yaml` , see success [log](https://screenshot.googleplex.com/C9yXpqpa4sb9Yax). Fixes #2860
1 parent 79e527a commit 490e9d2

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

container-structure-test.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ commandTests:
1616
- name: "librarian version"
1717
command: ["/app/librarian", "version"]
1818
expectedOutput: ["\\d+\\.\\d+\\.\\d+"]
19-
# temporarily disabled, tracked in
20-
# https://github.com/googleapis/librarian/issues/2860
21-
# - name: "docker"
22-
# command: ["docker", "version"]
23-
# expectedOutput: ["Docker Engine", "Version:"]
19+
- name: "docker"
20+
command: ["docker", "version"]
21+
expectedOutput: ["Docker Engine", "Version:"]
22+
envVars:
23+
# Pin the Docker API version to match the one supported by the
24+
# Docker server in the Cloud Build environment.
25+
- key: "DOCKER_API_VERSION"
26+
value: "1.41"
2427
- name: "gcloud"
2528
command: ["gcloud", "--version"]
2629
expectedOutput: ["Google Cloud SDK"]

0 commit comments

Comments
 (0)