Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: aiordache <anca.iordache@docker.com>
  • Loading branch information
aiordache committed Oct 8, 2020
1 parent 19e8141 commit 072215b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TEST_API_VERSION ?= 1.39
TEST_ENGINE_VERSION ?= 19.03.12
TEST_ENGINE_VERSION ?= 19.03.13

.PHONY: all
all: test
Expand Down
8 changes: 1 addition & 7 deletions docker/transport/sshconn.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,7 @@ def connect(self, **kwargs):
stdin=subprocess.PIPE)

def sendall(self, msg):
if not self.proc or self.proc.stdin.closed:
raise Exception('SSH subprocess not initiated.'
'connect() must be called first.')
self.proc.stdin.write(msg)
self.proc.stdin.flush()
self.send(msg)

def send(self, msg):
if not self.proc or self.proc.stdin.closed:
Expand Down Expand Up @@ -153,8 +149,6 @@ def __init__(self, ssh_client=None, timeout=60, maxsize=10, host=None):
self.ssh_transport = ssh_client.get_transport()
self.timeout = timeout
self.host = host

# self.base_url = six.moves.urllib_parse.urlparse(host)
self.port = None
if ':' in host:
self.host, self.port = host.split(':')
Expand Down
7 changes: 4 additions & 3 deletions tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
ARG PYTHON_VERSION=3.7

FROM python:${PYTHON_VERSION}

ARG APT_MIRROR
RUN sed -ri "s/(httpredir|deb).debian.org/${APT_MIRROR:-deb.debian.org}/g" /etc/apt/sources.list \
&& sed -ri "s/(security).debian.org/${APT_MIRROR:-security.debian.org}/g" /etc/apt/sources.list

RUN apt-get update && apt-get -y install --no-install-recommends \
gnupg2 \
pass \
curl \
openssh-client
gnupg2 \
openssh-client \
pass

# Add SSH keys and set permissions
COPY tests/ssh-keys /root/.ssh
Expand Down

0 comments on commit 072215b

Please sign in to comment.