Check padded length
This commit is contained in:
parent
1a4f56f444
commit
45a8e47395
|
@ -109,7 +109,10 @@ function remove_padding {
|
||||||
function run_tests {
|
function run_tests {
|
||||||
pass="SuperSecretPassword"
|
pass="SuperSecretPassword"
|
||||||
padded=$(pad_string "$pass")
|
padded=$(pad_string "$pass")
|
||||||
echo "|${padded}|"
|
if [ ${#padded} -ne 128 ]; then
|
||||||
|
echo $'Incorrect padded length'
|
||||||
|
exit 78352
|
||||||
|
fi
|
||||||
${PROJECT_NAME}-pass -u root -a tests -p "$pass"
|
${PROJECT_NAME}-pass -u root -a tests -p "$pass"
|
||||||
returned_pass=$(${PROJECT_NAME}-pass -u root -a tests)
|
returned_pass=$(${PROJECT_NAME}-pass -u root -a tests)
|
||||||
if [[ "$pass" != "$returned_pass" ]]; then
|
if [[ "$pass" != "$returned_pass" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue