Skip to content

Commit cfd143b

Browse files
committed
ci: Install sshd to test against a real ssh server
test/docker/entrypoint.sh now does the setup so sshd can run.
1 parent 90162b0 commit cfd143b

File tree

6 files changed

+16
-0
lines changed

6 files changed

+16
-0
lines changed

test/docker/alpine/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ RUN apk add --no-cache \
99
musl-dev \
1010
py3-pexpect \
1111
py3-pytest-xdist \
12+
openssh-server \
1213
tar \
1314
xvfb \
1415
xvfb-run \

test/docker/centos7/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ RUN set -x \
1717
# /usr/bin/which: https://bugzilla.redhat.com/show_bug.cgi?id=1443357 \
1818
/usr/bin/which \
1919
/usr/bin/xvfb-run \
20+
openssh-server \
2021
python36-pexpect
2122

2223
ADD test-cmd-list.txt \

test/docker/debian10/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \
77
autoconf \
88
automake \
99
make \
10+
openssh-server \
1011
python3-pexpect \
1112
python3-pytest-xdist \
1213
xvfb xauth \

test/docker/entrypoint.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ oldpwd=$(pwd)
1313
cp -a . /work
1414
cd /work
1515

16+
# Dependencies for running sshd and connecting to it
17+
ssh-keygen -A
18+
mkdir -p ~/.ssh/ /var/run/sshd
19+
echo "localhost $(cat /etc/ssh/ssh_host_ed25519_key.pub)" >>~/.ssh/known_hosts
20+
ssh-keygen -t ed25519 -N '' -f "$HOME/.ssh/id_ed25519"
21+
cat "$HOME/.ssh/id_ed25519.pub" >>"$HOME/.ssh/authorized_keys"
22+
23+
# sshd forces you to run with the full path
24+
sshpath="$(command -v sshd)"
25+
$sshpath
26+
1627
autoreconf -i
1728
./configure
1829
make -j

test/docker/fedoradev/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ RUN echo install_weak_deps=False >> /etc/dnf/dnf.conf \
99
/usr/bin/make \
1010
/usr/bin/xvfb-run \
1111
/usr/bin/pytest-3 \
12+
openssh-server \
1213
python3-pexpect \
1314
python3-pytest-xdist \
1415
&& ln -s $(type -P pytest-3) /usr/local/bin/pytest

test/docker/ubuntu14/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \
88
automake \
99
make \
1010
software-properties-common \
11+
openssh-server \
1112
xvfb \
1213
&& python3.4 -c "import urllib.request; urllib.request.urlretrieve('https://github.com/pyston/pyston/releases/download/pyston_2.3.1/pyston_2.3.1_portable_v2.tar.gz', '/tmp/pyston.tar.gz')" \
1314
&& tar xCf /usr/local /tmp/pyston.tar.gz --strip-components=1

0 commit comments

Comments
 (0)