Simplify start/stop helper func in system tests
The system test should never attempt to start or stop any other server than those that belong to that system test. Therefore, it is not necessary to specify the system test name in function calls. Additionally, this makes it possible to run the test inside a differently named directory, as its name is automatically detected with the $SYSTESTDIR variable. This enables running the system tests inside a temporary directory. Direct use of stop.pl was replaced with a more systematic approach to use stop_servers helper function.
This commit is contained in:
@@ -388,7 +388,7 @@ rm named.pid
|
||||
cd ..
|
||||
sleep 10
|
||||
if
|
||||
start_server --noclean --restart --port ${PORT} nsupdate ns1
|
||||
start_server --noclean --restart --port ${PORT} ns1
|
||||
then
|
||||
echo_i "restarted server ns1"
|
||||
else
|
||||
@@ -501,13 +501,13 @@ update add updated4.example.nil. 600 A 10.10.10.3
|
||||
send
|
||||
END
|
||||
sleep 3
|
||||
$PERL ../stop.pl --use-rndc --port ${CONTROLPORT} nsupdate ns1
|
||||
stop_server --use-rndc --port ${CONTROLPORT} ns1
|
||||
sleep 3
|
||||
# Removing the journal file and restarting the server means
|
||||
# that the data served by the new server process are exactly
|
||||
# those dumped to the file by "rndc stop".
|
||||
rm -f ns1/*jnl
|
||||
start_server --noclean --restart --port ${PORT} nsupdate ns1
|
||||
start_server --noclean --restart --port ${PORT} ns1
|
||||
for try in 0 1 2 3 4 5 6 7 8 9; do
|
||||
iret=0
|
||||
$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
|
||||
|
||||
Reference in New Issue
Block a user