Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

SNFMilterConfigTests.txt 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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 stoped. 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 with "-start", and verify that SNFMilter starts.
  111. 2) Run SNFMilterConfig with "-start" again and verify that SNFMilter
  112. is not started again.
  113. 3) Run SNFMitlerConfig with "-stop" and verify that SNFMilter stops.
  114. 4) Run SNFMitlerConfig with "-stop" again and verify that SNFMilter
  115. is not stopped again.
  116. Result:
  117. START_STOP_SEC-02: Repeat START_STOP_SEC-01 but with "-v" in the
  118. command-line.
  119. Result:
  120. START_STOP_SEC-03: Configure as for START_STOP_SEC-01, and do the
  121. following:
  122. 1) Run SNFMilterConfig with "-start -explain". Verify correct
  123. output, and that SNFMilterConfig doesn't start SNFMilter.
  124. 2) Run SNFMilterConfig with "-stop -explain". Verify correct
  125. output, and that SNFMilterConfig doesn't stop SNFMilter.
  126. 3) Start SNFMilter.
  127. 4) Run SNFMilterConfig with "-start -explain". Verify correct
  128. output, and that SNFMilterConfig doesn't start SNFMilter.
  129. 5) Run SNFMilterConfig with "-stop -explain". Verify correct
  130. output, and that SNFMilterConfig doesn't stop SNFMilter.
  131. Result: