|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327 |
- SNFMilterConfig Tests
-
- $Id$
-
- SNFUtility revision 9
-
- Help functionality
- ------------------
-
- HELP-01: SNFMilterConfig without any command options outputs a help
- message.
-
- Result: Pass.
-
-
- Conflict detection
- ------------------
-
- CONFLICT-01: Run with -setup, -id, and -auth. Verify that help
- message is output, and that SNFMilterConfig takes no action.
-
- Result: Pass.
-
- CONFLICT-02: Run with -setup and -start. Verify that help message is
- output, and that SNFMilterConfig takes no action.
-
- Result: Pass.
-
- CONFLICT-03: Run with -setup and -stop. Verify that help message is
- output, and that SNFMilterConfig takes no action.
-
- Result: Pass.
-
- CONFLICT-04: Run with -setup and -mta=XXX, where XXX is postfix,
- sendmail, and none. Verify that help message is output, and that
- SNFMilterConfig takes no action.
-
- Result: Pass.
-
- Setup/Repair functionality
- --------------------------
-
- SETUP-01: Start with no configuration files installed (SNFMilter.xml,
- identity.xml GBUdbIgnoreList.txt, and getRulebase). Verify that
- either "-setup" or "-repair" creates these files with the default
- credentials.
-
- Result: Pass.
-
- SETUP-02: Repeat SETUP-01 with -v and verify that files are created.
-
- Result: Pass.
-
- SETUP-03: Repeat SETUP-01 with -explain and verify that files are not created.
-
- Result: Pass? Exception thrown (as expected) when attempting to read
- configuration file that doesn't exist.
-
- Config file specification
- -------------------------
-
- CONF-01: Start with no configuration files, and copy the sample
- configuration file to test.xml. Run with "-setup -config=test.xml",
- and verify that all configuration files except
- /etc/snf-milter/SNFMilter.xml are created.
-
- Result: Pass.
-
- CONF-02: Repeat with -v and verify the same behavior.
-
- Result: Pass.
-
- CONF-03: Repeat with -explain.
-
- Result: Pass.
-
- Credential Functionality
- ------------------------
-
- CRED-01: Configure, and run "-id=xxx -auth=yyy" with specification of
- incorrect credentials. Verify:
-
- 1) getRulebase is not updated, and getRulebase.failed file is
- created.,
-
- 2) The rulebase downloaded fails, and an error message is output,
-
- 3) The identity.xml file is not changed.
-
- Result: Pass.
-
- CRED-02: Repeat CRED-01 with -v and verify correct operation.
-
- Result: Pass.
-
- CRED-03: Repeat CRED-01 with -explain and verify correct operation.
-
- Result: Pass.
-
- CRED-04: Install default configuration files. Modify identity.xml as
- follows:
-
- 1) Change the license ID to "XXX" and authentication to "YYY".
-
- 2) Add a comment.
-
- Then run with "-id=testmode -auth=setuptestingonly". Verify:
-
- 1) getRulebase is updated, and the new rulebase is downloaded.
-
- 2) identity.xml has only the license ID and authentication updated.
-
- Result: Pass.
-
- CRED-05: Repeat CRED-04 with -v and verify correct operation.
-
- Result: Pass.
-
- CRED-05: Repeat CRED-04 with -explain and verify correct operation.
-
- Result: Pass
-
- Start/stop functionality with XCI enabled
- -----------------------------------------
-
- START_STOP_XCI-01: Install default configuration files, and ensure
- that SNFMilter is stoped. Create a configuration file
- SNFMilter_xci.xml as follows:
-
- 1) Enable XCI.
-
- 2) Enable status.second logging, with no append.
-
- 3) Enable status.minute logging, with append.
-
- Do the following, specifying the configuration file SNFMilter_xci.xml:
-
- 1) Run SNFMilterConfig with "-start", and verify that SNFMilter starts.
-
- 2) Run SNFMilterConfig with "-start" again and verify that SNFMilter
- is not started again.
-
- 3) Run SNFMitlerConfig with "-stop" and verify that SNFMilter stops.
-
- 4) Run SNFMitlerConfig with "-stop" again and verify that SNFMilter
- is not stopped again.
-
- Result: Pass
-
- START_STOP_XCI-02: Repeat START_STOP_XCI-01 but with "-v" in the command-line.
-
- Result: Pass
-
- START_STOP_XCI-03: Configure as for START_STOP_XCI-01, and do the following:
-
- 1) Run SNFMilterConfig with "-start -explain". Verify correct
- output, and that SNFMilterConfig doesn't start SNFMilter.
-
- 2) Run SNFMilterConfig with "-stop -explain". Verify correct
- output, and that SNFMilterConfig doesn't stop SNFMilter.
-
- 3) Start SNFMilter.
-
- 4) Run SNFMilterConfig with "-start -explain". Verify correct
- output, and that SNFMilterConfig doesn't start SNFMilter.
-
- 5) Run SNFMilterConfig with "-stop -explain". Verify correct
- output, and that SNFMilterConfig doesn't stop SNFMilter.
-
- Result: Pass
-
- Start/stop functionality with XCI disabled, status.second enabled
- -----------------------------------------------------------------
-
- START_STOP_SEC-01: Install default configuration files, and ensure
- that SNFMilter is stopped. Create a configuration file
- SNFMilter_second.xml as follows:
-
- 1) Disable XCI.
-
- 2) Enable status.second logging, with no append.
-
- 3) Enable status.minute logging, with append.
-
- Do the following, specifying the configuration file SNFMilter_second.xml:
-
- 1) Run "SNFMilterConfig -config=SNFMilter_second.xml -start", and verify that SNFMilter starts.
-
- 2) Run "SNFMilterConfig -config=SNFMilter_second.xml -start" again
- and verify that SNFMilter is not started again.
-
- 3) Run "SNFMilterConfig -config=SNFMilter_second.xml -stop" and
- verify that SNFMilter stops.
-
- 4) Run "SNFMilterConfig -config=SNFMilter_second.xml -stop" again
- and verify that SNFMilter is not stopped again.
-
- Result: Pass
-
- START_STOP_SEC-02: Repeat START_STOP_SEC-01 but with "-v" in the
- command-line.
-
- Result: Pass
-
- START_STOP_SEC-03: Configure as for START_STOP_SEC-01, and do the
- following:
-
- 1) Run SNFMilterConfig with "-start -explain". Verify correct
- output, and that SNFMilterConfig doesn't start SNFMilter.
-
- 2) Run SNFMilterConfig with "-stop -explain". Verify correct
- output, and that SNFMilterConfig doesn't stop SNFMilter.
-
- 3) Start SNFMilter.
-
- 4) Run SNFMilterConfig with "-start -explain". Verify correct
- output, and that SNFMilterConfig doesn't start SNFMilter.
-
- 5) Run SNFMilterConfig with "-stop -explain". Verify correct
- output, and that SNFMilterConfig doesn't stop SNFMilter.
-
- Result: Pass
-
- Start/stop functionality with XCI and status.second enabled, append mode
- ------------------------------------------------------------------------
-
- START_STOP_SEC_APP-01: Install default configuration files, and ensure
- that SNFMilter is stopped. Create a configuration file
- SNFMilter_second_append.xml as follows:
-
- 1) Disable XCI.
-
- 2) Enable status.second logging with append.
-
- 3) Enable status.minute logging, with append.
-
- Do the following, specifying the configuration file SNFMilter_second_append.xml:
-
- 1) Run "SNFMilterConfig -config=SNFMilter_second_append.xml -start",
- and verify that SNFMilter starts.
-
- 2) Run "SNFMilterConfig -config=SNFMilter_second_append.xml -start"
- again and verify that SNFMilter is not started again.
-
- 3) Run "SNFMilterConfig -config=SNFMilter_second_append.xml -stop"
- and verify that SNFMilter stops.
-
- 4) Run "SNFMilterConfig -config=SNFMilter_second_append.xml -stop"
- again and verify that SNFMilter is not stopped again.
-
- Result:
-
- START_STOP_SEC_APP-02: Repeat START_STOP_SEC_APP-01 but with "-v" in
- the command-line.
-
- Result:
-
- START_STOP_SEC_APP-03: Configure as for START_STOP_SEC_APP-01, and do
- the following:
-
- 1) Run SNFMilterConfig with "-start -explain". Verify correct
- output, and that SNFMilterConfig doesn't start SNFMilter.
-
- 2) Run SNFMilterConfig with "-stop -explain". Verify correct
- output, and that SNFMilterConfig doesn't stop SNFMilter.
-
- 3) Start SNFMilter.
-
- 4) Run SNFMilterConfig with "-start -explain". Verify correct
- output, and that SNFMilterConfig doesn't start SNFMilter.
-
- 5) Run SNFMilterConfig with "-stop -explain". Verify correct
- output, and that SNFMilterConfig doesn't stop SNFMilter.
-
- Result:
-
- Start/stop functionality with XCI and status.second disabled, status.minute enabled
- -----------------------------------------------------------------------------------
-
- START_STOP_MIN-01: Install default configuration files, and ensure
- that SNFMilter is stopped. Create a configuration file
- SNFMilter_minute.xml as follows:
-
- 1) Disable XCI.
-
- 2) Disable status.second logging.
-
- 3) Enable status.minute logging, with append.
-
- Do the following, specifying the configuration file SNFMilter_minute.xml:
-
- 1) Run "SNFMilterConfig -config=SNFMilter_minute.xml -start", and verify that SNFMilter starts.
-
- 2) Run "SNFMilterConfig -config=SNFMilter_minute.xml -start" again
- and verify that SNFMilter is not started again.
-
- 3) Run "SNFMilterConfig -config=SNFMilter_minute.xml -stop" and
- verify that SNFMilter stops.
-
- 4) Run "SNFMilterConfig -config=SNFMilter_minute.xml -stop" again
- and verify that SNFMilter is not stopped again.
-
- Result:
-
- START_STOP_MIN-02: Repeat START_STOP_MIN-01 but with "-v" in the
- command-line.
-
- Result:
-
- START_STOP_MIN-03: Configure as for START_STOP_MIN-01, and do the
- following:
-
- 1) Run SNFMilterConfig with "-start -explain". Verify correct
- output, and that SNFMilterConfig doesn't start SNFMilter.
-
- 2) Run SNFMilterConfig with "-stop -explain". Verify correct
- output, and that SNFMilterConfig doesn't stop SNFMilter.
-
- 3) Start SNFMilter.
-
- 4) Run SNFMilterConfig with "-start -explain". Verify correct
- output, and that SNFMilterConfig doesn't start SNFMilter.
-
- 5) Run SNFMilterConfig with "-stop -explain". Verify correct
- output, and that SNFMilterConfig doesn't stop SNFMilter.
-
- Result:
|