Name core tests consistently
Now, given a concept xyz, * the main test file is called test_xyz.cc * the executable is called test_xyz, and * the ctest test is called text_xyz.
This commit is contained in:
committed by
MassimilianoPinto
parent
18fa04aa79
commit
e377b30803
25
server/core/test/test_maxpasswd.sh
Executable file
25
server/core/test/test_maxpasswd.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Create a temporary directory: /tmp/tmp.<random>
|
||||
SECRETS_DIR=`mktemp -d`
|
||||
|
||||
# Generate a .secrets file.
|
||||
../maxkeys ${SECRETS_DIR} || exit 1
|
||||
|
||||
# Generate a key.
|
||||
KEY=`../maxpasswd ${SECRETS_DIR} dummy`
|
||||
|
||||
# Remove the temporary directory.
|
||||
rm -rf ${SECRETS_DIR}
|
||||
|
||||
# Get the length of the generated KEY.
|
||||
LENGTH=${#KEY}
|
||||
|
||||
if [ ${LENGTH} -eq 32 ]
|
||||
then
|
||||
# Exactly 32 characters => Ok!
|
||||
exit 0
|
||||
else
|
||||
# Something else; chances are maxpasswd outputs garbage.
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user