test-0044.sh 527 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. . ./test-common.sh
  3. cleanup 44
  4. # ------------------------------- Test 44 ------------------------------------
  5. # Test that prerotate and postrotate scripts are called once when nosharedscripts
  6. # is defined and one rotation fails
  7. preptest test.log 44 1
  8. $RLR test-config.44 2>error.log
  9. grep "error: stat of" error.log >/dev/null
  10. if [ $? != 0 ]; then
  11. echo "No error printed, but there should be one."
  12. exit 3
  13. fi
  14. rm -f error.log
  15. checkoutput <<EOF
  16. test.log 0
  17. test.log.1 0 zero
  18. scriptout 0 "test.log;test.log;"
  19. EOF