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. CONFLICT-05: Run with -config=SNFMilter_second.xml -start. 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. 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, specifying the configuration file SNFMilter_second.xml: 1) Run "SNFMilterConfig -start -v", and verify that SNFMilter starts. 2) Run "SNFMilterConfig -start -v" again and verify that SNFMilter is not started again. 3) Run "SNFMilterConfig -stop -v" and verify that SNFMilter stops. 4) Run "SNFMilterConfig -stop -v" again and verify that SNFMilter is not stopped again. Result: START_STOP_SEC-02: Repeat START_STOP_SEC-01 but without "-v" in the command-line. Result: 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: 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: