Skip to content

Commit 23422c1

Browse files
committed
fix one more docker-compose invocation
1 parent e851c82 commit 23422c1

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

ipyparallel/tests/conftest.py

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ def ssh_dir(request):
197197
yaml_file = "linux_docker-compose.yaml"
198198

199199
try:
200-
out = check_output(['docker-compose', '-f', yaml_file, 'ps', '-q'], cwd=ssh_dir)
200+
out = check_output(
201+
['docker', 'compose', '-f', yaml_file, 'ps', '-q'], cwd=ssh_dir
202+
)
201203
except Exception:
202204
pytest.skip("Needs docker compose")
203205
else:
@@ -213,24 +215,3 @@ def ssh_dir(request):
213215
# # shutdown service when we exit
214216
# request.addfinalizer(lambda: check_call(["docker-compose", "down"], cwd=ssh_dir))
215217
return ssh_dir
216-
217-
218-
# ssh_key fixture not needed any more, since id_rsa is copied during docker-compose stage
219-
# @pytest.fixture
220-
# def ssh_key(tmpdir, ssh_dir):
221-
# key_file = tmpdir.join("id_rsa")
222-
# check_call(
223-
# # this should be `docker compose cp sshd:...`
224-
# # but docker-compose 1.x doesn't support `cp` yet
225-
# [
226-
# 'docker',
227-
# 'cp',
228-
# 'ssh_sshd_1:/home/ciuser/.ssh/id_rsa',
229-
# key_file,
230-
# ],
231-
# cwd=ssh_dir,
232-
# )
233-
# os.chmod(key_file, 0o600)
234-
# with key_file.open('r') as f:
235-
# assert 'PRIVATE KEY' in f.readline()
236-
# return str(key_file)

0 commit comments

Comments
 (0)