Commit 21e689a1 authored by Bastian Blank's avatar Bastian Blank

Move simple tests to combined test structure

Having a common tests tree makes unifying tests easier.
parent a0415207
......@@ -5,3 +5,5 @@
/etc/*.mirror
/locks
/log
/tests/log
/tests/output
......@@ -9,11 +9,11 @@ package:
variables:
LOGNAME: root
script:
- cd test/simple && bats tests
- cd tests && bats scripts/default
artifacts:
paths:
- test/simple/log
- test/simple/output
- tests/log
- tests/output
when: always
.test security: &TEST-SECURITY
......
../../../bin/ftpsync
\ No newline at end of file
../../../bin/runmirrors
\ No newline at end of file
../../bin/ftpsync
\ No newline at end of file
../../bin/runmirrors
\ No newline at end of file
port = 2873
[debian]
path = input
path = input/default
use chroot = false
cert = etc/ssl/crt
key = etc/ssl/key
cert = etc/default/ssl/crt
key = etc/default/ssl/key
pid =
foreground = yes
[service]
accept = 127.0.0.1:1873
exec = /usr/bin/rsync
execArgs = --server --daemon --config etc/rsyncd.conf .
execArgs = --server --daemon --config etc/default/rsyncd.conf .
RSYNC_SOURCE=input/
RSYNC_SOURCE=input/default/
TO=output/$TESTID/
LOGDIR=log/$TESTID/
MIRRORNAME=localhost
......
......@@ -2,5 +2,5 @@ TO=output/$TESTID/
LOGDIR=log/$TESTID/
RSYNC_HOST=localhost
RSYNC_TRANSPORT=ssl
RSYNC_SSL_CAPATH=etc/ssl
RSYNC_SSL_CAPATH=etc/default/ssl
RSYNC_SSL_METHOD=stunnel-old
......@@ -5,7 +5,7 @@ load helper
setup() {
local logdir=log/$(testid)
mkdir -p $logdir
coproc rsyncd { exec rsync --daemon --no-detach --config etc/rsyncd.conf --log-file $logdir/rsyncd.log; }
coproc rsyncd { exec rsync --daemon --no-detach --config etc/default/rsyncd.conf --log-file $logdir/rsyncd.log; }
}
teardown() {
......
......@@ -5,7 +5,7 @@ load helper
setup() {
local logdir=log/$(testid)
mkdir -p $logdir
coproc stunnel { exec stunnel etc/stunnel.conf >$logdir/stunnel.log 2>&1; }
coproc stunnel { exec stunnel etc/default/stunnel.conf > $logdir/stunnel.log 2>&1; }
}
teardown() {
......
function testid() {
echo $(basename $BATS_TEST_FILENAME)/$BATS_TEST_NUMBER
echo default/$(basename $BATS_TEST_FILENAME)/$BATS_TEST_NUMBER
}
function run_ftpsync() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment