test 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/bash
  2. shellfu import jat_dump
  3. reply_md() {
  4. local case=$1
  5. case $case in
  6. new)
  7. echo FOO
  8. echo 6
  9. echo 7
  10. echo hello
  11. echo joe
  12. echo sh
  13. echo just a test module
  14. echo something something
  15. ;;
  16. add)
  17. echo FOO
  18. echo y
  19. echo hello
  20. echo jane
  21. echo sh
  22. echo just another test module
  23. echo something something else else
  24. ;;
  25. esac
  26. }
  27. jat__pstartt "create module set"
  28. jat__eval "reply_md new | preupg-content-creator"
  29. jat__eval "reply_md add | preupg-content-creator"
  30. jat__eval "echo log_info Hello >> FOO/hello/joe/check"
  31. jat__eval "echo exit_pass >> FOO/hello/joe/check"
  32. jat__eval "echo log_info Bye >> FOO/hello/jane/check"
  33. jat__eval "echo exit_pass >> FOO/hello/jane/check"
  34. jat__eval "preupg-xccdf-compose FOO 1>pxc.out 2>pxc.err"
  35. jat__eval "mv FOO FOO-raw; mv FOO-results FOO"
  36. jat__pend
  37. jat__pstartt "check for specific problems"
  38. jat__eval -S 1 -h "solution key was not added (PR#328)" -b pa_pr_328 \
  39. "find FOO -name module.ini | xargs -L1 grep -w ^solution | grep ."
  40. jat__eval -S 1 -h "no warning about solution key (PR#328)" -b pa_pr_328 \
  41. "grep -q 'Warning: tags: .solution. are not allowed in config file' pxc.err"
  42. jat__pend
  43. jat__pstartd "diag"
  44. jat_dump__file pxc.out pxc.err
  45. jat__pend
  46. jat__pstartt "run module set"
  47. jat__cmd preupg -c FOO/all-xccdf.xml --force
  48. jat__pend