Skip to content

Commit 0ea7d2d

Browse files
committed
Update tests to create Docker client from environment
1 parent 106f2ad commit 0ea7d2d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/test_versions.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import pytest
2-
from docker import APIClient
32

43
from .utils import run_command_in_container
54

@@ -90,7 +89,7 @@ def test_command_versions_image_master(command, expected_output):
9089
('cargo --version', 'cargo 1.46.0 (149022b1d 2020-07-17)'),
9190
('git --version', 'git version 2.17.1'),
9291
('jsdoc --version', 'JSDoc 3.6.6 (Sun, 20 Sep 2020 02:25:14 GMT)'),
93-
('cat /usr/local/lib/node_modules/typedoc/package.json | grep "\"version\": "', ' "version": "0.20.20"'),
92+
('cat /usr/local/lib/node_modules/typedoc/package.json | grep -E "version.:"', ' "version": "0.20.20"'),
9493
]
9594
)
9695
def test_command_versions_image_70(command, expected_output):

tests/utils.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
from docker import APIClient
1+
import docker
22

33

44
def run_command_in_container(container_image, command):
5-
client = APIClient()
5+
# CircleCI exports environment variables that ``.from_env()`` uses
6+
client = docker.from_env().api
67

78
# Create the container
89
container = client.create_container(

0 commit comments

Comments
 (0)