mirror of
https://github.com/upa/mscp.git
synced 2026-02-14 09:14:47 +08:00
port test: sshd listens on 8022 and run mscp with -P 8022 v6only test: change remote name from localhost to ip6-localhost
27 lines
589 B
Bash
Executable File
27 lines
589 B
Bash
Executable File
#!/bin/bash -e
|
|
#
|
|
# Run this script in mscp docker containers.
|
|
# This script runs end-to-end test with installed mscp.
|
|
|
|
script_dir=$(cd $(dirname ${0}) && pwd)
|
|
cd $script_dir
|
|
|
|
set -x
|
|
|
|
# sshd Linsten on 22 and 8022
|
|
echo "Port 22" > /etc/ssh/sshd_config.d/mscp-test.conf
|
|
echo "Port 8022" >> /etc/ssh/sshd_config.d/mscp-test.conf
|
|
|
|
# Run sshd
|
|
if [ ! -e /var/run/sshd.pid ]; then
|
|
/usr/sbin/sshd
|
|
sleep 1
|
|
fi
|
|
|
|
ssh-keyscan localhost >> ${HOME}/.ssh/known_hosts
|
|
ssh-keyscan 127.0.0.1 >> ${HOME}/.ssh/known_hosts
|
|
ssh-keyscan ::1 >> ${HOME}/.ssh/known_hosts
|
|
|
|
# Run test
|
|
python3 -m pytest -v ../test
|