Ver código fonte

Test start/stop functionality with different configuration of log file

rotation, and local/GMT time.


git-svn-id: https://svn.microneil.com/svn/SNFUtility/trunk@27 aa37657e-1934-4a5f-aa6d-2d8eab27ff7c
master
adeniz 12 anos atrás
pai
commit
9694cfa00f

+ 3
- 2
Common/UtilityConfig.cpp Ver arquivo

@@ -653,7 +653,7 @@ UtilityConfig::GetReportViaLogFile(GetLogFileName GetLogFileNamePtr, int SleepTi
NewLogFileName = (this->*GetLogFileNamePtr)();
if (IncreasedTimeoutTime && (NewLogFileName != LogFileName)) { // Filename changes if it contains a
if (!IncreasedTimeoutTime && (NewLogFileName != LogFileName)) { // Filename changes if it contains a
// date stemp and the time is close
// to midnight.
TimeoutTime_msec *= 2;
@@ -672,7 +672,8 @@ UtilityConfig::GetReportViaLogFile(GetLogFileName GetLogFileNamePtr, int SleepTi
FinalContents = ReadLastPartOfFile(LogFileName, LogFileReportSize); // Read again.
if (InitialContents != FinalContents) { // Contents have changed.
if ( (FinalContents.length() != 0) && // There is a report, and
(InitialContents != FinalContents) ) { // the contents have changed.
if (Verbose()) {

+ 79
- 19
SNFMilterConfig/SNFMilterConfigTests.txt Ver arquivo

@@ -16,8 +16,8 @@ message.
Conflict detection
------------------

CONFLICT-01: Run with -setup, -id, and -auth. Verify that help
message is output, and that SNFMilterConfig takes no action.
CONFLICT-01: Run with -setup, -id=xxx, and -auth=yyy. Verify that
help message is output, and that SNFMilterConfig takes no action.

Result: Pass.

@@ -31,12 +31,51 @@ output, and that SNFMilterConfig takes no action.

Result: Pass.

CONFLICT-04: Run with -setup and -mta=XXX, where XXX is postfix,
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
--------------------------

@@ -128,12 +167,12 @@ Do the following, specifying the configuration file SNFMilter_xci.xml:
4) Run SNFMitlerConfig with "-stop -v" again and verify that
SNFMilter is still stopped.

Result: Pass
Result: Pass.

START_STOP_XCI-02: Repeat START_STOP_XCI-01 but without "-v" in the
command-line.

Result:
Result: Pass.

START_STOP_XCI-03: Configure as for START_STOP_XCI-01, and do the following:

@@ -151,7 +190,7 @@ START_STOP_XCI-03: Configure as for START_STOP_XCI-01, and do the following:
5) Run SNFMilterConfig with "-stop -explain". Verify correct
output, and that SNFMilter is still running.

Result:
Result: Pass.

Start/stop functionality with XCI disabled, status.second enabled
-----------------------------------------------------------------
@@ -178,12 +217,12 @@ Do the following:
4) Run "SNFMilterConfig -stop -v" again and verify that SNFMilter is
still stopped.

Result: Pass
Result: Pass.

START_STOP_SEC-02: Repeat START_STOP_SEC-01 but without "-v" in the
command-line.

Result: Pass
Result: Pass.

START_STOP_SEC-03: Configure as for START_STOP_SEC-01, and do the
following:
@@ -202,7 +241,7 @@ following:
5) Run SNFMilterConfig with "-stop -explain". Verify correct
output, and that SNFMilter is still running.

Result: Pass
Result: Pass.

Start/stop functionality with XCI disabled and status.second enabled, append mode
---------------------------------------------------------------------------------
@@ -219,7 +258,8 @@ SNFMilter_second_append.xml with the following configuration:
4) Set localtime to "no" for rotation.

Do the following when the local date is different from the date from
gmtime():
gmtime(). In each step, verify that the datestamp is the universal
date.

1) Run "SNFMilterConfig -start -v", and verify that SNFMilter
starts.
@@ -232,15 +272,17 @@ gmtime():
4) Run "SNFMilterConfig -stop -v" again and verify that SNFMilter is
still stopped.

Result: Pass
Result: Pass.

START_STOP_SEC_APP-02: Repeat START_STOP_SEC_APP-01 but without "-v"
in the command-line.

Result:
Result: Pass.

START_STOP_SEC_APP-03: Configure as for START_STOP_SEC_APP-01, and do
the following:
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.
@@ -256,7 +298,7 @@ the following:
5) Run SNFMilterConfig with "-stop -explain". Verify correct
output, and that SNFMilterConfig doesn't stop SNFMilter.

Result:
Result: Pass.

Start/stop functionality with XCI and status.second disabled, status.minute enabled
-----------------------------------------------------------------------------------
@@ -271,7 +313,10 @@ SNFMilter_minute.xml as follows:

3) Enable status.minute logging, with append.

Do the following, specifying the configuration file SNFMilter_minute.xml:
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.
@@ -284,15 +329,30 @@ Do the following, specifying the configuration file SNFMilter_minute.xml:
4) Run "SNFMilterConfig -stop -v" again and verify that SNFMilter is
not stopped again.

Result:
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.

START_STOP_MIN-02: Repeat START_STOP_MIN-01 but without "-v" in the
command-line.

Result:

START_STOP_MIN-03: Configure as for START_STOP_MIN-01, and do the
following:
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.

+ 1
- 1
SNFMilterConfig/SNFMilter_minute.xml Ver arquivo

@@ -13,7 +13,7 @@
<logs>
<rotation localtime='no'/>
<rotation localtime='yes'/>
<status>
<second log='no' append='no'/>

Carregando…
Cancelar
Salvar