SNFMilterConfig Tests 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". For example: date 0825235912.30; ./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: Pass. 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: Pass. 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 and POSTFIX-04 on Fedora. Result: Pass. POSTFIX-08: Repeat POSTFIX-01 and POSTFIX-04 on OpenSuse. Result: Pass. POSTFIX-09: Repeat POSTFIX-01 and POSTFIX-04 on CentOS. Result: Pass. POSTFIX-10: Repeat POSTFIX-01 and POSTFIX-04 on OpenBSD. Result: POSTFIX-11: Repeat POSTFIX-01 and POSTFIX-04 on FreeBSD. Result: