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

SNFMilterConfigTests.txt 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. SNFMilterConfig Tests
  2. SNFUtility revision 9
  3. Help functionality
  4. ------------------
  5. HELP-01: SNFMilterConfig without any command options outputs a help
  6. message.
  7. Result: Pass.
  8. Conflict detection
  9. ------------------
  10. CONFLICT-01: Run with -setup, -id=xxx, and -auth=yyy. Verify that
  11. help message is output, and that SNFMilterConfig takes no action.
  12. Result: Pass.
  13. CONFLICT-02: Run with -setup and -start. Verify that help message is
  14. output, and that SNFMilterConfig takes no action.
  15. Result: Pass.
  16. CONFLICT-03: Run with -setup and -stop. Verify that help message is
  17. output, and that SNFMilterConfig takes no action.
  18. Result: Pass.
  19. CONFLICT-04: Run with -setup and each of the following command line
  20. parameters:
  21. 1) -auth
  22. 2) -auth=
  23. 3) -auth=xxx
  24. 4) -id
  25. 5) -id=
  26. 6) -id=xxx
  27. Verify that in each case the help message is output, and that
  28. SNFMilterConfig takes no action.
  29. Result: Pass.
  30. CONFLICT-05: Run with -setup and -mta=XXX, where XXX is postfix,
  31. sendmail, and none. Verify that help message is output, and that
  32. SNFMilterConfig takes no action.
  33. Result: Pass.
  34. CONFLICT-06: Run with -mta=postfix and one of the following commands:
  35. 1) -auth
  36. 2) -auth=
  37. 3) -auth=xxx
  38. 4) -id
  39. 5) -id=
  40. 6) -id=xxx
  41. Verify that in each case the help message is output, and that
  42. SNFMilterConfig takes no action.
  43. Result: Pass.
  44. Setup/Repair functionality
  45. --------------------------
  46. SETUP-01: Start with no configuration files installed (SNFMilter.xml,
  47. identity.xml GBUdbIgnoreList.txt, and getRulebase). Verify that
  48. either "-setup" or "-repair" creates these files with the default
  49. credentials.
  50. Result: Pass.
  51. SETUP-02: Repeat SETUP-01 with -v and verify that files are created.
  52. Result: Pass.
  53. SETUP-03: Repeat SETUP-01 with -explain and verify that files are not created.
  54. Result: Pass? Exception thrown (as expected) when attempting to read
  55. configuration file that doesn't exist.
  56. Credential Functionality
  57. ------------------------
  58. CRED-01: Configure, and run "-id=xxx -auth=yyy" with specification of
  59. incorrect credentials. Verify:
  60. 1) getRulebase is not updated, and getRulebase.failed file is
  61. created.,
  62. 2) The rulebase downloaded fails, and an error message is output,
  63. 3) The identity.xml file is not changed.
  64. Result: Pass.
  65. CRED-02: Repeat CRED-01 with -v and verify correct operation.
  66. Result: Pass.
  67. CRED-03: Repeat CRED-01 with -explain and verify correct operation.
  68. Result: Pass.
  69. CRED-04: Install default configuration files. Modify identity.xml as
  70. follows:
  71. 1) Change the license ID to "XXX" and authentication to "YYY".
  72. 2) Add a comment.
  73. Then run with "-id=testmode -auth=setuptestingonly". Verify:
  74. 1) getRulebase is updated, and the new rulebase is downloaded.
  75. 2) identity.xml has only the license ID and authentication updated.
  76. Result: Pass.
  77. CRED-05: Repeat CRED-04 with -v and verify correct operation.
  78. Result: Pass.
  79. CRED-05: Repeat CRED-04 with -explain and verify correct operation.
  80. Result: Pass
  81. Start/stop functionality with XCI enabled
  82. -----------------------------------------
  83. START_STOP_XCI-01: Install configuration file SNFMilter_xci.xml with
  84. the following configuration:
  85. 1) Enable XCI.
  86. 2) Enable status.second logging, with no append.
  87. 3) Enable status.minute logging, with append.
  88. Do the following, specifying the configuration file SNFMilter_xci.xml:
  89. 1) Run SNFMilterConfig with "-v -start", and verify that SNFMilter
  90. starts.
  91. 2) Run SNFMilterConfig with "-start -v" again and verify that
  92. SNFMilter is still running.
  93. 3) Run SNFMitlerConfig with "-stop -v" and verify that SNFMilter
  94. stops.
  95. 4) Run SNFMitlerConfig with "-stop -v" again and verify that
  96. SNFMilter is still stopped.
  97. Result: Pass.
  98. START_STOP_XCI-02: Repeat START_STOP_XCI-01 but without "-v" in the
  99. command-line.
  100. Result: Pass.
  101. START_STOP_XCI-03: Configure as for START_STOP_XCI-01, and do the following:
  102. 1) Run SNFMilterConfig with "-start -explain". Verify correct
  103. output, and that SNFMilter isn't started.
  104. 2) Run SNFMilterConfig with "-stop -explain". Verify correct
  105. output, and that SNFMilter isn't started.
  106. 3) Start SNFMilter.
  107. 4) Run SNFMilterConfig with "-start -explain". Verify correct
  108. output, and that SNFMilter is still running.
  109. 5) Run SNFMilterConfig with "-stop -explain". Verify correct
  110. output, and that SNFMilter is still running.
  111. Result: Pass.
  112. Start/stop functionality with XCI disabled, status.second enabled
  113. -----------------------------------------------------------------
  114. START_STOP_SEC-01: Install configuration file SNFMilter_second.xml
  115. with the following configuration:
  116. 1) Disable XCI.
  117. 2) Enable status.second logging, with no append.
  118. 3) Enable status.minute logging, with append.
  119. Do the following:
  120. 1) Run "SNFMilterConfig -start -v", and verify that SNFMilter
  121. starts.
  122. 2) Run "SNFMilterConfig -start -v" again and verify that SNFMilter
  123. is still running.
  124. 3) Run "SNFMilterConfig -stop -v" and verify that SNFMilter stops.
  125. 4) Run "SNFMilterConfig -stop -v" again and verify that SNFMilter is
  126. still stopped.
  127. Result: Pass.
  128. START_STOP_SEC-02: Repeat START_STOP_SEC-01 but without "-v" in the
  129. command-line.
  130. Result: Pass.
  131. START_STOP_SEC-03: Configure as for START_STOP_SEC-01, and do the
  132. following:
  133. 1) Run SNFMilterConfig with "-start -explain". Verify correct
  134. output, and that SNFMilter is still stopped.
  135. 2) Run SNFMilterConfig with "-stop -explain". Verify correct
  136. output, and that SNFMilter is still stopped.
  137. 3) Start SNFMilter.
  138. 4) Run SNFMilterConfig with "-start -explain". Verify correct
  139. output, and that SNFMilter is still running.
  140. 5) Run SNFMilterConfig with "-stop -explain". Verify correct
  141. output, and that SNFMilter is still running.
  142. Result: Pass.
  143. Start/stop functionality with XCI disabled and status.second enabled, append mode
  144. ---------------------------------------------------------------------------------
  145. START_STOP_SEC_APP-01: Install configuration file
  146. SNFMilter_second_append.xml with the following configuration:
  147. 1) Disable XCI.
  148. 2) Enable status.second logging with append.
  149. 3) Enable status.minute logging, with append.
  150. 4) Set localtime to "no" for rotation.
  151. Do the following when the local date is different from the date from
  152. gmtime(). In each step, verify that the datestamp is the universal
  153. date.
  154. 1) Run "SNFMilterConfig -start -v", and verify that SNFMilter
  155. starts.
  156. 2) Run "SNFMilterConfig -start -v" again and verify that SNFMilter
  157. is still running.
  158. 3) Run "SNFMilterConfig -v -stop" and verify that SNFMilter stops.
  159. 4) Run "SNFMilterConfig -stop -v" again and verify that SNFMilter is
  160. still stopped.
  161. Result: Pass.
  162. START_STOP_SEC_APP-02: Repeat START_STOP_SEC_APP-01 but without "-v"
  163. in the command-line.
  164. Result: Pass.
  165. START_STOP_SEC_APP-03: Configure as for START_STOP_SEC_APP-01, and do
  166. the following when the local date is different from the date from
  167. gmtime(). In each step, verify that the datestamp is the universal
  168. date.
  169. 1) Run SNFMilterConfig with "-start -explain". Verify correct
  170. output, and that SNFMilterConfig doesn't start SNFMilter.
  171. 2) Run SNFMilterConfig with "-stop -explain". Verify correct
  172. output, and that SNFMilterConfig doesn't stop SNFMilter.
  173. 3) Start SNFMilter.
  174. 4) Run SNFMilterConfig with "-start -explain". Verify correct
  175. output, and that SNFMilterConfig doesn't start SNFMilter.
  176. 5) Run SNFMilterConfig with "-stop -explain". Verify correct
  177. output, and that SNFMilterConfig doesn't stop SNFMilter.
  178. Result: Pass.
  179. Start/stop functionality with XCI and status.second disabled, status.minute enabled
  180. -----------------------------------------------------------------------------------
  181. START_STOP_MIN-01: Install default configuration files, and ensure
  182. that SNFMilter is stopped. Create a configuration file
  183. SNFMilter_minute.xml as follows:
  184. 1) Disable XCI.
  185. 2) Disable status.second logging.
  186. 3) Enable status.minute logging, with append.
  187. 4) Set localtime to "yes" for rotation.
  188. Do the following when the local date is different from the date from
  189. gmtime(). In each step, verify that the datestamp is the local date.
  190. 1) Run "SNFMilterConfig -start -v", and verify that SNFMilter
  191. starts.
  192. 2) Run "SNFMilterConfig -v -start" again and verify that SNFMilter
  193. is not started again.
  194. 3) Run "SNFMilterConfig -v -stop" and verify that SNFMilter stops.
  195. 4) Run "SNFMilterConfig -stop -v" again and verify that SNFMilter is
  196. not stopped again.
  197. Result: Pass.
  198. START_STOP_MIN-02: Repeat START_STOP_MIN-01 but with the following
  199. changes:
  200. 1) Delete all files in the SNFMilter log directory.
  201. 2) Set the time to 23:59:30 and immediately run "SNFMilterConfig
  202. -start -v". For example:
  203. date 0825235912.30; ./SNFMilterConfig -start -v
  204. 3) Verify that:
  205. a) SNFMilter starts.
  206. b) SNFMilterConfig changed the name of the log file it was
  207. checking when checking whether SNFMilter is running before
  208. starting SNFMilter.
  209. Result: Pass.
  210. START_STOP_MIN-03: Configure as for START_STOP_MIN-01, and do the
  211. following when the local date is different from the date from
  212. gmtime(). In each step, verify that the datestamp is the local date.
  213. 1) Run SNFMilterConfig with "-start -explain". Verify correct
  214. output, and that SNFMilterConfig doesn't start SNFMilter.
  215. 2) Run SNFMilterConfig with "-stop -explain". Verify correct
  216. output, and that SNFMilterConfig doesn't stop SNFMilter.
  217. 3) Start SNFMilter.
  218. 4) Run SNFMilterConfig with "-start -explain". Verify correct
  219. output, and that SNFMilterConfig doesn't start SNFMilter.
  220. 5) Run SNFMilterConfig with "-stop -explain". Verify correct
  221. output, and that SNFMilterConfig doesn't stop SNFMilter.
  222. Result: Pass.
  223. Integration with postfix
  224. ------------------------
  225. POSTFIX-01: On Ubuntu, set up the environment as follows:
  226. 1) Default configuration files for SNFMilter.
  227. 2) SNFMilter stopped.
  228. 3) Default configuration files for postfix.
  229. 4) postfix stopped.
  230. Do the following:
  231. 1) Run SNFMilterConfig with "-with=postfix -v" and verify that the
  232. postfix configuration files are updated to be integrated with
  233. SNFMilter. Verify also that both postfix and SNFMilter are
  234. stopped.
  235. 2) Run SNFMilterConfig with "-with=postfix -v" and verify that the
  236. postfix configuration files are not updated, and that both
  237. postfix and SNFMilter are stopped.
  238. 3) Run SNFMilterConfig with "-with=none -v" and verify that the
  239. postfix configuration files are updated such that the integration
  240. with SNFMilter is removed. Verify also that both postfix and
  241. SNFMilter are stopped.
  242. 4) Run SNFMilterConfig with "-with=none -v" and verify that the
  243. postfix configuration files are not updated, and that both
  244. postfix and SNFMilter are stopped.
  245. Result: Pass.
  246. POSTFIX-02: Repeat POSTFIX-01 but without "-v".
  247. Result: Pass.
  248. POSTFIX-03: Configure as for POSTFIX-01, and do the following:
  249. 1) Run SNFMilterConfig with "-with=postfix -explain". Verify
  250. correct output, and that SNFMilterConfig doesn't update the
  251. postfix configuration files or reload any MTA.
  252. 2) Run SNFMilterConfig with "-with=none -explain". Verify correct
  253. output, and that SNFMilterConfig doesn't update the postfix
  254. configuration files or reload any MTA.
  255. 3) Run SNFMilterConfig with "-with=postfix". Verify correct output,
  256. and that SNFMilterConfig updates the postfix configuration files.
  257. 4) Run SNFMilterConfig with "-with=postfix -explain". Verify
  258. correct output, and that SNFMilterConfig doesn't update the
  259. postfix configuration files or reload any MTA.
  260. 5) Run SNFMilterConfig with "-with=none -explain". Verify correct
  261. output, and that SNFMilterConfig doesn't update the postfix
  262. configuration files or reload any MTA.
  263. Result: Pass
  264. POSTFIX-04: On Ubuntu, set up the environment as follows:
  265. 1) Default configuration files for SNFMilter.
  266. 2) SNFMilter stopped.
  267. 3) Default configuration files for postfix.
  268. 4) postfix running.
  269. Do the following:
  270. 1) Run SNFMilterConfig with "-with=postfix -v" and verify that the
  271. postfix configuration files are updated to be integrated with
  272. SNFMilter. Verify also that SNFMilter is not running and that
  273. postfix is running and was reloaded.
  274. 2) Run SNFMilterConfig with "-with=postfix -v" and verify that the
  275. postfix configuration files are not updated, that SNFMilter is
  276. not running, and that postfix is running and was not reloaded.
  277. 3) Run SNFMilterConfig with "-with=none -v" and verify that the
  278. postfix configuration files are updated such that the integration
  279. with SNFMilter is removed. Verify also that SNFMilter is not
  280. running, and that postfix is running and was not reloaded.
  281. 4) Run SNFMilterConfig with "-with=none -v" and verify that the
  282. postfix configuration files are not updated, and that SNFMilter
  283. is not running and that postfix is running and was not reloaded.
  284. Result: Pass.
  285. POSTFIX-05: Repeat POSTFIX-04 but without "-v".
  286. Result: Pass.
  287. POSTFIX-06: Configure as for POSTFIX-04, and do the following:
  288. 1) Run SNFMilterConfig with "-with=postfix -explain". Verify
  289. correct output, and that SNFMilterConfig doesn't update the
  290. postfix configuration files or reload any MTA.
  291. 2) Run SNFMilterConfig with "-with=none -explain". Verify correct
  292. output, and that SNFMilterConfig doesn't update the postfix
  293. configuration files or reload any MTA.
  294. 3) Run SNFMilterConfig with "-with=postfix". Verify correct output,
  295. and that SNFMilterConfig updates the postfix configuration files
  296. and reloads the MTA.
  297. 4) Run SNFMilterConfig with "-with=postfix -explain". Verify
  298. correct output, and that SNFMilterConfig doesn't update the
  299. postfix configuration files or reload any MTA.
  300. 5) Run SNFMilterConfig with "-with=none -explain". Verify correct
  301. output, and that SNFMilterConfig doesn't update the postfix
  302. configuration files or reload any MTA.
  303. Result: Pass.
  304. POSTFIX-07: Repeat POSTFIX-01 and POSTFIX-04 on Fedora.
  305. Result: Pass.
  306. POSTFIX-08: Repeat POSTFIX-01 and POSTFIX-04 on OpenSuse.
  307. Result: Pass.
  308. POSTFIX-09: Repeat POSTFIX-01 and POSTFIX-04 on CentOS.
  309. Result: Pass.
  310. POSTFIX-10: Repeat POSTFIX-01 and POSTFIX-04 on OpenBSD.
  311. Result: Pass.
  312. POSTFIX-11: Repeat POSTFIX-01 and POSTFIX-04 on FreeBSD.
  313. Result: Pass.