123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514 |
- 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=xxx, and -auth=yyy. 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 each of the following command line
- parameters:
-
- 1) -auth
-
- 2) -auth=
-
- 3) -auth=xxx
-
- 4) -id
-
- 5) -id=
-
- 6) -id=xxx
-
- Verify that in each case the help message is output, and that
- SNFMilterConfig takes no action.
-
- Result: Pass.
-
- CONFLICT-05: 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.
-
- CONFLICT-06: Run with -mta=postfix and one of the following commands:
-
- 1) -auth
-
- 2) -auth=
-
- 3) -auth=xxx
-
- 4) -id
-
- 5) -id=
-
- 6) -id=xxx
-
- Verify that in each case the 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.
-
- 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 configuration file SNFMilter_xci.xml with
- the following configuration:
-
- 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 "-v -start", and verify that SNFMilter
- starts.
-
- 2) Run SNFMilterConfig with "-start -v" again and verify that
- SNFMilter is still running.
-
- 3) Run SNFMitlerConfig with "-stop -v" and verify that SNFMilter
- stops.
-
- 4) Run SNFMitlerConfig with "-stop -v" again and verify that
- SNFMilter is still stopped.
-
- Result: Pass.
-
- START_STOP_XCI-02: Repeat START_STOP_XCI-01 but without "-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 SNFMilter isn't started.
-
- 2) Run SNFMilterConfig with "-stop -explain". Verify correct
- output, and that SNFMilter isn't started.
-
- 3) Start SNFMilter.
-
- 4) Run SNFMilterConfig with "-start -explain". Verify correct
- output, and that SNFMilter is still running.
-
- 5) Run SNFMilterConfig with "-stop -explain". Verify correct
- output, and that SNFMilter is still running.
-
- Result: Pass.
-
- Start/stop functionality with XCI disabled, status.second enabled
- -----------------------------------------------------------------
-
- START_STOP_SEC-01: Install configuration file SNFMilter_second.xml
- with the following configuration:
-
- 1) Disable XCI.
-
- 2) Enable status.second logging, with no append.
-
- 3) Enable status.minute logging, with append.
-
- Do the following:
-
- 1) Run "SNFMilterConfig -start -v", and verify that SNFMilter
- starts.
-
- 2) Run "SNFMilterConfig -start -v" again and verify that SNFMilter
- is still running.
-
- 3) Run "SNFMilterConfig -stop -v" and verify that SNFMilter stops.
-
- 4) Run "SNFMilterConfig -stop -v" again and verify that SNFMilter is
- still stopped.
-
- Result: Pass.
-
- START_STOP_SEC-02: Repeat START_STOP_SEC-01 but without "-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 SNFMilter is still stopped.
-
- 2) Run SNFMilterConfig with "-stop -explain". Verify correct
- output, and that SNFMilter is still stopped.
-
- 3) Start SNFMilter.
-
- 4) Run SNFMilterConfig with "-start -explain". Verify correct
- output, and that SNFMilter is still running.
-
- 5) Run SNFMilterConfig with "-stop -explain". Verify correct
- output, and that SNFMilter is still running.
-
- Result: Pass.
-
- Start/stop functionality with XCI disabled and status.second enabled, append mode
- ---------------------------------------------------------------------------------
-
- START_STOP_SEC_APP-01: Install configuration file
- SNFMilter_second_append.xml with the following configuration:
-
- 1) Disable XCI.
-
- 2) Enable status.second logging with append.
-
- 3) Enable status.minute logging, with append.
-
- 4) Set localtime to "no" for rotation.
-
- Do the following when the local date is different from the date from
- gmtime(). In each step, verify that the datestamp is the universal
- date.
-
- 1) Run "SNFMilterConfig -start -v", and verify that SNFMilter
- starts.
-
- 2) Run "SNFMilterConfig -start -v" again and verify that SNFMilter
- is still running.
-
- 3) Run "SNFMilterConfig -v -stop" and verify that SNFMilter stops.
-
- 4) Run "SNFMilterConfig -stop -v" again and verify that SNFMilter is
- still stopped.
-
- Result: Pass.
-
- START_STOP_SEC_APP-02: Repeat START_STOP_SEC_APP-01 but without "-v"
- in the command-line.
-
- Result: Pass.
-
- START_STOP_SEC_APP-03: Configure as for START_STOP_SEC_APP-01, and do
- the following when the local date is different from the date from
- gmtime(). In each step, verify that the datestamp is the universal
- date.
-
- 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 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.
-
- 4) Set localtime to "yes" for rotation.
-
- Do the following when the local date is different from the date from
- gmtime(). In each step, verify that the datestamp is the local date.
-
- 1) Run "SNFMilterConfig -start -v", and verify that SNFMilter
- starts.
-
- 2) Run "SNFMilterConfig -v -start" again and verify that SNFMilter
- is not started again.
-
- 3) Run "SNFMilterConfig -v -stop" and verify that SNFMilter stops.
-
- 4) Run "SNFMilterConfig -stop -v" again and verify that SNFMilter is
- not stopped again.
-
- Result: Pass.
-
- START_STOP_MIN-02: Repeat START_STOP_MIN-01 but with the following
- changes:
-
- 1) Delete all files in the SNFMilter log directory.
-
- 2) Set the time to 23:59:30 and immediately run "SNFMilterConfig
- -start -v".
-
- 3) Verify that:
-
- a) SNFMilter starts.
-
- b) SNFMilterConfig changed the name of the log file it was
- checking when checking whether SNFMilter is running before
- starting SNFMilter.
-
-
- Result:
-
- START_STOP_MIN-03: Configure as for START_STOP_MIN-01, and do the
- following when the local date is different from the date from
- gmtime(). In each step, verify that the datestamp is the local date.
-
- 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:
-
- Integration with postfix
- ------------------------
-
- POSTFIX-01: On Ubuntu, set up the environment as follows:
-
- 1) Default configuration files for SNFMilter.
-
- 2) SNFMilter stopped.
-
- 3) Default configuration files for postfix.
-
- 4) postfix stopped.
-
- Do the following:
-
- 1) Run SNFMilterConfig with "-with=postfix -v" and verify that the
- postfix configuration files are updated to be integrated with
- SNFMilter. Verify also that both postfix and SNFMilter are
- stopped.
-
- 2) Run SNFMilterConfig with "-with=postfix -v" and verify that the
- postfix configuration files are not updated, and that both
- postfix and SNFMilter are stopped.
-
- 3) Run SNFMilterConfig with "-with=none -v" and verify that the
- postfix configuration files are updated such that the integration
- with SNFMilter is removed. Verify also that both postfix and
- SNFMilter are stopped.
-
- 4) Run SNFMilterConfig with "-with=none -v" and verify that the
- postfix configuration files are not updated, and that both
- postfix and SNFMilter are stopped.
-
- Result: Pass.
-
- POSTFIX-02: Repeat POSTFIX-01 but without "-v".
-
- Result: Pass.
-
- POSTFIX-03: Configure as for POSTFIX-01, and do the following:
-
- 1) Run SNFMilterConfig with "-with=postfix -explain". Verify
- correct output, and that SNFMilterConfig doesn't update the
- postfix configuration files or reload any MTA.
-
- 2) Run SNFMilterConfig with "-with=none -explain". Verify correct
- output, and that SNFMilterConfig doesn't update the postfix
- configuration files or reload any MTA.
-
- 3) Run SNFMilterConfig with "-with=postfix". Verify correct output,
- and that SNFMilterConfig updates the postfix configuration files.
-
- 4) Run SNFMilterConfig with "-with=postfix -explain". Verify
- correct output, and that SNFMilterConfig doesn't update the
- postfix configuration files or reload any MTA.
-
- 5) Run SNFMilterConfig with "-with=none -explain". Verify correct
- output, and that SNFMilterConfig doesn't update the postfix
- configuration files or reload any MTA.
-
- Result: Pass
-
- POSTFIX-04: On Ubuntu, set up the environment as follows:
-
- 1) Default configuration files for SNFMilter.
-
- 2) SNFMilter stopped.
-
- 3) Default configuration files for postfix.
-
- 4) postfix running.
-
- Do the following:
-
- 1) Run SNFMilterConfig with "-with=postfix -v" and verify that the
- postfix configuration files are updated to be integrated with
- SNFMilter. Verify also that SNFMilter is not running and that
- postfix is running and was reloaded.
-
- 2) Run SNFMilterConfig with "-with=postfix -v" and verify that the
- postfix configuration files are not updated, that SNFMilter is
- not running, and that postfix is running and was not reloaded.
-
- 3) Run SNFMilterConfig with "-with=none -v" and verify that the
- postfix configuration files are updated such that the integration
- with SNFMilter is removed. Verify also that SNFMilter is not
- running, and that postfix is running and was not reloaded.
-
- 4) Run SNFMilterConfig with "-with=none -v" and verify that the
- postfix configuration files are not updated, and that SNFMilter
- is not running and that postfix is running and was not reloaded.
-
- Result: Pass.
-
- POSTFIX-05: Repeat POSTFIX-04 but without "-v".
-
- Result: Pass.
-
- POSTFIX-06: Configure as for POSTFIX-04, and do the following:
-
- 1) Run SNFMilterConfig with "-with=postfix -explain". Verify
- correct output, and that SNFMilterConfig doesn't update the
- postfix configuration files or reload any MTA.
-
- 2) Run SNFMilterConfig with "-with=none -explain". Verify correct
- output, and that SNFMilterConfig doesn't update the postfix
- configuration files or reload any MTA.
-
- 3) Run SNFMilterConfig with "-with=postfix". Verify correct output,
- and that SNFMilterConfig updates the postfix configuration files
- and reloads the MTA.
-
- 4) Run SNFMilterConfig with "-with=postfix -explain". Verify
- correct output, and that SNFMilterConfig doesn't update the
- postfix configuration files or reload any MTA.
-
- 5) Run SNFMilterConfig with "-with=none -explain". Verify correct
- output, and that SNFMilterConfig doesn't update the postfix
- configuration files or reload any MTA.
-
- Result: Pass.
-
- POSTFIX-07: Repeat POSTFIX-01 thru POSTFIX-07 on Fedora.
-
- Result:
-
- POSTFIX-08: Repeat POSTFIX-01 thru POSTFIX-07 on OpenSuse.
-
- Result:
-
- POSTFIX-09: Repeat POSTFIX-01 thru POSTFIX-07 on CentOS.
-
- Result:
-
- POSTFIX-10: Repeat POSTFIX-01 thru POSTFIX-07 on OpenBSD.
-
- Result:
-
- POSTFIX-11: Repeat POSTFIX-01 thru POSTFIX-07 on FreeBSD.
-
- Result:
|