test-0034.sh 533 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. . ./test-common.sh
  3. cleanup 34
  4. # ------------------------------- Test 34 ------------------------------------
  5. # We support changing user/mode without setting mode in create directive now
  6. # We can't change user/group as normal user, so this test uses debug mode and
  7. # checks the logrotate -d output.
  8. preptest test.log 34 1 0
  9. $RLR test-config.34 -d -f 2>&1|grep "uid = 0 gid = 0" > /dev/null
  10. if [ $? != 0 ]; then
  11. echo "logrotate output must contain 'uid = 0 gid = 0'"
  12. exit 3
  13. fi
  14. checkoutput <<EOF
  15. test.log 0 zero
  16. EOF