Skip to content

Commit

Permalink
fix one more docker-compose invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed Oct 28, 2024
1 parent e851c82 commit 23422c1
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions ipyparallel/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ def ssh_dir(request):
yaml_file = "linux_docker-compose.yaml"

try:
out = check_output(['docker-compose', '-f', yaml_file, 'ps', '-q'], cwd=ssh_dir)
out = check_output(
['docker', 'compose', '-f', yaml_file, 'ps', '-q'], cwd=ssh_dir
)
except Exception:
pytest.skip("Needs docker compose")
else:
Expand All @@ -213,24 +215,3 @@ def ssh_dir(request):
# # shutdown service when we exit
# request.addfinalizer(lambda: check_call(["docker-compose", "down"], cwd=ssh_dir))
return ssh_dir


# ssh_key fixture not needed any more, since id_rsa is copied during docker-compose stage
# @pytest.fixture
# def ssh_key(tmpdir, ssh_dir):
# key_file = tmpdir.join("id_rsa")
# check_call(
# # this should be `docker compose cp sshd:...`
# # but docker-compose 1.x doesn't support `cp` yet
# [
# 'docker',
# 'cp',
# 'ssh_sshd_1:/home/ciuser/.ssh/id_rsa',
# key_file,
# ],
# cwd=ssh_dir,
# )
# os.chmod(key_file, 0o600)
# with key_file.open('r') as f:
# assert 'PRIVATE KEY' in f.readline()
# return str(key_file)

0 comments on commit 23422c1

Please sign in to comment.