選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

SNFMilterConfigTests.txt 9.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. SNFMilterConfig Tests
  2. $Id$
  3. SNFUtility revision 9
  4. Help functionality
  5. ------------------
  6. HELP-01: SNFMilterConfig without any command options outputs a help
  7. message.
  8. Result: Pass.
  9. Conflict detection
  10. ------------------
  11. CONFLICT-01: Run with -setup, -id, and -auth. Verify that help
  12. message is output, and that SNFMilterConfig takes no action.
  13. Result: Pass.
  14. CONFLICT-02: Run with -setup and -start. Verify that help message is
  15. output, and that SNFMilterConfig takes no action.
  16. Result: Pass.
  17. CONFLICT-03: Run with -setup and -stop. Verify that help message is
  18. output, and that SNFMilterConfig takes no action.
  19. Result: Pass.
  20. CONFLICT-04: Run with -setup and -mta=XXX, where XXX is postfix,
  21. sendmail, and none. Verify that help message is output, and that
  22. SNFMilterConfig takes no action.
  23. Result: Pass.
  24. Setup/Repair functionality
  25. --------------------------
  26. SETUP-01: Start with no configuration files installed (SNFMilter.xml,
  27. identity.xml GBUdbIgnoreList.txt, and getRulebase). Verify that
  28. either "-setup" or "-repair" creates these files with the default
  29. credentials.
  30. Result: Pass.
  31. SETUP-02: Repeat SETUP-01 with -v and verify that files are created.
  32. Result: Pass.
  33. SETUP-03: Repeat SETUP-01 with -explain and verify that files are not created.
  34. Result: Pass? Exception thrown (as expected) when attempting to read
  35. configuration file that doesn't exist.
  36. Config file specification
  37. -------------------------
  38. CONF-01: Start with no configuration files, and copy the sample
  39. configuration file to test.xml. Run with "-setup -config=test.xml",
  40. and verify that all configuration files except
  41. /etc/snf-milter/SNFMilter.xml are created.
  42. Result: Pass.
  43. CONF-02: Repeat with -v and verify the same behavior.
  44. Result: Pass.
  45. CONF-03: Repeat with -explain.
  46. Result: Pass.
  47. Credential Functionality
  48. ------------------------
  49. CRED-01: Configure, and run "-id=xxx -auth=yyy" with specification of
  50. incorrect credentials. Verify:
  51. 1) getRulebase is not updated, and getRulebase.failed file is
  52. created.,
  53. 2) The rulebase downloaded fails, and an error message is output,
  54. 3) The identity.xml file is not changed.
  55. Result: Pass.
  56. CRED-02: Repeat CRED-01 with -v and verify correct operation.
  57. Result: Pass.
  58. CRED-03: Repeat CRED-01 with -explain and verify correct operation.
  59. Result: Pass.
  60. CRED-04: Install default configuration files. Modify identity.xml as
  61. follows:
  62. 1) Change the license ID to "XXX" and authentication to "YYY".
  63. 2) Add a comment.
  64. Then run with "-id=testmode -auth=setuptestingonly". Verify:
  65. 1) getRulebase is updated, and the new rulebase is downloaded.
  66. 2) identity.xml has only the license ID and authentication updated.
  67. Result: Pass.
  68. CRED-05: Repeat CRED-04 with -v and verify correct operation.
  69. Result: Pass.
  70. CRED-05: Repeat CRED-04 with -explain and verify correct operation.
  71. Result: Pass
  72. Start/stop functionality with XCI enabled
  73. -----------------------------------------
  74. START_STOP_XCI-01: Install default configuration files, and ensure
  75. that SNFMilter is stoped. Create a configuration file
  76. SNFMilter_xci.xml as follows:
  77. 1) Enable XCI.
  78. 2) Enable status.second logging, with no append.
  79. 3) Enable status.minute logging, with append.
  80. Do the following, specifying the configuration file SNFMilter_xci.xml:
  81. 1) Run SNFMilterConfig with "-start", and verify that SNFMilter starts.
  82. 2) Run SNFMilterConfig with "-start" again and verify that SNFMilter
  83. is not started again.
  84. 3) Run SNFMitlerConfig with "-stop" and verify that SNFMilter stops.
  85. 4) Run SNFMitlerConfig with "-stop" again and verify that SNFMilter
  86. is not stopped again.
  87. Result: Pass
  88. START_STOP_XCI-02: Repeat START_STOP_XCI-01 but with "-v" in the command-line.
  89. Result: Pass
  90. START_STOP_XCI-03: Configure as for START_STOP_XCI-01, and do the following:
  91. 1) Run SNFMilterConfig with "-start -explain". Verify correct
  92. output, and that SNFMilterConfig doesn't start SNFMilter.
  93. 2) Run SNFMilterConfig with "-stop -explain". Verify correct
  94. output, and that SNFMilterConfig doesn't stop SNFMilter.
  95. 3) Start SNFMilter.
  96. 4) Run SNFMilterConfig with "-start -explain". Verify correct
  97. output, and that SNFMilterConfig doesn't start SNFMilter.
  98. 5) Run SNFMilterConfig with "-stop -explain". Verify correct
  99. output, and that SNFMilterConfig doesn't stop SNFMilter.
  100. Result: Pass
  101. Start/stop functionality with XCI disabled, status.second enabled
  102. -----------------------------------------------------------------
  103. START_STOP_SEC-01: Install default configuration files, and ensure
  104. that SNFMilter is stopped. Create a configuration file
  105. SNFMilter_second.xml as follows:
  106. 1) Disable XCI.
  107. 2) Enable status.second logging, with no append.
  108. 3) Enable status.minute logging, with append.
  109. Do the following, specifying the configuration file SNFMilter_second.xml:
  110. 1) Run "SNFMilterConfig -config=SNFMilter_second.xml -start", and verify that SNFMilter starts.
  111. 2) Run "SNFMilterConfig -config=SNFMilter_second.xml -start" again
  112. and verify that SNFMilter is not started again.
  113. 3) Run "SNFMilterConfig -config=SNFMilter_second.xml -stop" and
  114. verify that SNFMilter stops.
  115. 4) Run "SNFMilterConfig -config=SNFMilter_second.xml -stop" again
  116. and verify that SNFMilter is not stopped again.
  117. Result: Pass
  118. START_STOP_SEC-02: Repeat START_STOP_SEC-01 but with "-v" in the
  119. command-line.
  120. Result: Pass
  121. START_STOP_SEC-03: Configure as for START_STOP_SEC-01, and do the
  122. following:
  123. 1) Run SNFMilterConfig with "-start -explain". Verify correct
  124. output, and that SNFMilterConfig doesn't start SNFMilter.
  125. 2) Run SNFMilterConfig with "-stop -explain". Verify correct
  126. output, and that SNFMilterConfig doesn't stop SNFMilter.
  127. 3) Start SNFMilter.
  128. 4) Run SNFMilterConfig with "-start -explain". Verify correct
  129. output, and that SNFMilterConfig doesn't start SNFMilter.
  130. 5) Run SNFMilterConfig with "-stop -explain". Verify correct
  131. output, and that SNFMilterConfig doesn't stop SNFMilter.
  132. Result: Pass
  133. Start/stop functionality with XCI and status.second enabled, append mode
  134. ------------------------------------------------------------------------
  135. START_STOP_SEC_APP-01: Install default configuration files, and ensure
  136. that SNFMilter is stopped. Create a configuration file
  137. SNFMilter_second_append.xml as follows:
  138. 1) Disable XCI.
  139. 2) Enable status.second logging with append.
  140. 3) Enable status.minute logging, with append.
  141. Do the following, specifying the configuration file SNFMilter_second_append.xml:
  142. 1) Run "SNFMilterConfig -config=SNFMilter_second_append.xml -start",
  143. and verify that SNFMilter starts.
  144. 2) Run "SNFMilterConfig -config=SNFMilter_second_append.xml -start"
  145. again and verify that SNFMilter is not started again.
  146. 3) Run "SNFMilterConfig -config=SNFMilter_second_append.xml -stop"
  147. and verify that SNFMilter stops.
  148. 4) Run "SNFMilterConfig -config=SNFMilter_second_append.xml -stop"
  149. again and verify that SNFMilter is not stopped again.
  150. Result:
  151. START_STOP_SEC_APP-02: Repeat START_STOP_SEC_APP-01 but with "-v" in
  152. the command-line.
  153. Result:
  154. START_STOP_SEC_APP-03: Configure as for START_STOP_SEC_APP-01, and do
  155. the following:
  156. 1) Run SNFMilterConfig with "-start -explain". Verify correct
  157. output, and that SNFMilterConfig doesn't start SNFMilter.
  158. 2) Run SNFMilterConfig with "-stop -explain". Verify correct
  159. output, and that SNFMilterConfig doesn't stop SNFMilter.
  160. 3) Start SNFMilter.
  161. 4) Run SNFMilterConfig with "-start -explain". Verify correct
  162. output, and that SNFMilterConfig doesn't start SNFMilter.
  163. 5) Run SNFMilterConfig with "-stop -explain". Verify correct
  164. output, and that SNFMilterConfig doesn't stop SNFMilter.
  165. Result:
  166. Start/stop functionality with XCI and status.second disabled, status.minute enabled
  167. -----------------------------------------------------------------------------------
  168. START_STOP_MIN-01: Install default configuration files, and ensure
  169. that SNFMilter is stopped. Create a configuration file
  170. SNFMilter_minute.xml as follows:
  171. 1) Disable XCI.
  172. 2) Disable status.second logging.
  173. 3) Enable status.minute logging, with append.
  174. Do the following, specifying the configuration file SNFMilter_minute.xml:
  175. 1) Run "SNFMilterConfig -config=SNFMilter_minute.xml -start", and verify that SNFMilter starts.
  176. 2) Run "SNFMilterConfig -config=SNFMilter_minute.xml -start" again
  177. and verify that SNFMilter is not started again.
  178. 3) Run "SNFMilterConfig -config=SNFMilter_minute.xml -stop" and
  179. verify that SNFMilter stops.
  180. 4) Run "SNFMilterConfig -config=SNFMilter_minute.xml -stop" again
  181. and verify that SNFMilter is not stopped again.
  182. Result:
  183. START_STOP_MIN-02: Repeat START_STOP_MIN-01 but with "-v" in the
  184. command-line.
  185. Result:
  186. START_STOP_MIN-03: Configure as for START_STOP_MIN-01, and do the
  187. following:
  188. 1) Run SNFMilterConfig with "-start -explain". Verify correct
  189. output, and that SNFMilterConfig doesn't start SNFMilter.
  190. 2) Run SNFMilterConfig with "-stop -explain". Verify correct
  191. output, and that SNFMilterConfig doesn't stop SNFMilter.
  192. 3) Start SNFMilter.
  193. 4) Run SNFMilterConfig with "-start -explain". Verify correct
  194. output, and that SNFMilterConfig doesn't start SNFMilter.
  195. 5) Run SNFMilterConfig with "-stop -explain". Verify correct
  196. output, and that SNFMilterConfig doesn't stop SNFMilter.
  197. Result: