mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
tests: ensure unique temporary config file names
Some unit tests share the same ocserv config file. Ensure that the file written and used by each test script has a unique name. Resolves #83 Signed-off-by: Mike Miller <mtmiller@debian.org>
This commit is contained in:
@@ -48,12 +48,12 @@ update_config() {
|
||||
file=$1
|
||||
username=$(whoami)
|
||||
group=$(groups|cut -f 1 -d ' ')
|
||||
cp "${srcdir}/data/${file}" "$file.tmp"
|
||||
sed -i 's|@USERNAME@|'${username}'|g' "$file.tmp"
|
||||
sed -i 's|@GROUP@|'${group}'|g' "$file.tmp"
|
||||
sed -i 's|@SRCDIR@|'${srcdir}'|g' "$file.tmp"
|
||||
sed -i 's|@CRLNAME@|'${CRLNAME}'|g' "$file.tmp"
|
||||
CONFIG="$file.tmp"
|
||||
cp "${srcdir}/data/${file}" "$file.$$.tmp"
|
||||
sed -i 's|@USERNAME@|'${username}'|g' "$file.$$.tmp"
|
||||
sed -i 's|@GROUP@|'${group}'|g' "$file.$$.tmp"
|
||||
sed -i 's|@SRCDIR@|'${srcdir}'|g' "$file.$$.tmp"
|
||||
sed -i 's|@CRLNAME@|'${CRLNAME}'|g' "$file.$$.tmp"
|
||||
CONFIG="$file.$$.tmp"
|
||||
}
|
||||
|
||||
fail() {
|
||||
|
||||
Reference in New Issue
Block a user