logintest_neg.sh 363 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. SCRIPT_PATH=${0%/*}
  3. if [ "$0" != "$SCRIPT_PATH" ] && [ "$SCRIPT_PATH" != "" ]; then
  4. cd "$SCRIPT_PATH/.."
  5. fi
  6. if [ $# -eq 1 ];
  7. then DAEMONFILEPATH="$1"
  8. fi
  9. ./ccats-cli --batch test/logintest_neg.txt
  10. if [ ! -f test/logintest_neg.txt.err ];
  11. then
  12. exit 1;
  13. fi
  14. if [ -z "$(grep "Login failed" test/logintest_neg.txt.err)" ];
  15. then
  16. exit 1;
  17. fi
  18. exit 0;