Design: 03.03/P03
This is an abstract, language-independent design. Grim
details may be found in the
corresponding source code.
You may return to the
documentation
for the module containing this program design, or to the
entire hierarchical table of
topics covered by the PVT.
PROGRAM 3: Archival conflict resolution
CHARACTERISTICS: nnnn
OPERATOR SCRIPT: passive test.
DESIGN:
When structures with the same identifiers are set up for testing,
the contents of those in the CSS differ from those in the
archive, so that the two versions are distinguishable. This is
noted by following the structure identifier with a "C" (for CSS)
or "A" (for archive).
open archive file = arid
*** *** *** archiving with MAINTAIN *** *** ***
set archival conflict resolution flag = MAINTAIN
*** archive existing structures
set up structures:
archive : 102-A, 104-A
CSS : 101-C, 104-C
<archive all structures> to arid
TEST: #SR 3 4 7
"When the archival resolution flag is MAINTAIN, <archive
all structures> should insert new structures into the
archive file, but not replace existing structures."
clear CSS
<retrieve all structures> from arid
pass/fail depending on (CSS = 101-C, 102-A, 104-A)
set up structures:
archive : 102-A, 104-A
CSS : 101-C, 104-C, with 101-C invoking 104-C
<archive structure networks> 101
TEST: #SR 2 4 7
"When the archival resolution flag is MAINTAIN, <archive
structure networks> should insert new structures into the
archive file, but not replace existing structures."
clear CSS
<retrieve all structures> from arid
pass/fail depending on (CSS = 101-C, 102-A, 104-A)
*** archive with some non-existent structures
set up structures:
archive : 102-A, 104-A
CSS : 101-C, 104-C
<archive structures> 101,102,103,104
TEST: #SR 1 4 5 7
"When the archival resolution flag is MAINTAIN and some of
the specified structures do not exist in the CSS, <archive
structures> should take no action for the non-existent
structures, add new structures to the archive file, but
not replace existing archive structures."
clear CSS
<retrieve all structures> from arid
pass/fail depending on (CSS = 101-C, 102-A, 104-A)
TEST: #SR 1 5
"When the archival resolution flag is MAINTAIN and some of
the specified structures do not exist in the CSS, <archive
structures> should signal error 200."
pass/fail depending on (Error 200 signalled from <archive
structures>)
*** *** *** archiving with UPDATE *** *** ***
set archival conflict resolution flag = UPDATE
*** archive existing structures
set up structures:
archive : 102-A, 104-A
CSS : 101-C, 104-C, with 101-C invoking 104-C
<archive structure networks> 101
TEST: #SR 2 4 6
"When the archival resolution flag is UPDATE and all of the
specified structures exist, <archive structure networks>
should insert new structures into the archive file, and
replace existing structures."
clear CSS
<retrieve all structures> from arid
pass/fail depending on (CSS = 101-C, 102-A, 104-C)
*** archive with some non-existent structures
set up structures:
archive : 102-A, 104-A
CSS : 101-C, 104-C
<archive structure networks> 101,102,103,104
TEST: #SR 2 4 5 6
"When the archival resolution flag is UPDATE and some of
the specified structures do not exist in the CSS, <archive
structure networks> should take no action for the
non-existent structures, add new structures to the archive
file, and replace existing archive structures."
clear CSS
<retrieve all structures> from arid
pass/fail depending on (CSS = 101-C, 102-A, 104-C)
TEST: #SR 2 5
"When the archival resolution flag is UPDATE and some of
the specified structures do not exist in the CSS, <archive
structure networks> should signal error 200."
pass/fail depending on (Error 200 signalled from <archive
structure networks>)
*** *** *** archiving with ABANDON *** *** ***
set archival conflict resolution flag = ABANDON
*** archive existing structures
set up structures:
archive : 102-A, 104-A
CSS : 101-C, 104-C, with 101-C invoking 104-C
<archive structures> 101
TEST: #SR 1 4
"When the archival resolution flag is ABANDON and all of
the specified structures exist in the CSS but not in the
archive file, <archive structures> should insert the new
structures into the archive file."
clear CSS
<retrieve all structures> from arid
pass/fail depending on (CSS = 101-C, 102-A, 104-A)
*** archive with some non-existent structures
set up structures:
archive : 102-A, 104-A
CSS : 101-C, 104-C
<archive structure networks> 101,102,103
TEST: #SR 2 4 5
"When the archival resolution flag is ABANDON and some of
the specified structures do not exist in the CSS, <archive
structure networks> should take no action for the
non-existent structures and add new structures to the
archive file."
clear CSS
<retrieve all structures> from arid
pass/fail depending on (CSS = 101-C, 102-A, 104-A)
TEST: #SR 2 5
"When the archival resolution flag is ABANDON and some of
the specified structures do not exist in the CSS, <archive
structure networks> should signal error 200."
pass/fail depending on (Error 200 signalled from <archive
structure networks>)
*** archive with duplicate structures to trigger ABANDON
set up structures:
archive : 102-A, 104-A
CSS : 101-C, 104-C
<archive all structures>
TEST: #SR 3 8
"When the archival resolution flag is ABANDON and some of
the specified structures are already in the archive file,
<archive all structures> should leave the archive file
unchanged."
clear CSS
<retrieve all structures> from arid
pass/fail depending on (CSS = 102-A, 104-A)
TEST: #SR 3 8
"When the archival resolution flag is ABANDON and some of
the specified structures are already in the archive file,
<archive all structures> should signal error 405."
pass/fail depending on (Error 405 signalled from <archive all
structures>)
*** archive with duplicate structures to trigger ABANDON and
*** non-existent structures
set up structures:
archive : 102-A, 104-A
CSS : 101-C, 104-C, with 101-C invoking 104-C
<archive structure networks> 101,103,102
TEST: #SR 2 8
"When the archival resolution flag is ABANDON and some of
the specified structures do not exist in the CSS and some
are already in the archive file, <archive structure
networks> should leave the archive file unchanged."
clear CSS
<retrieve all structures> from arid
pass/fail depending on (CSS = 102-A, 104-A)
TEST: #SR 2 5 8
"When the archival resolution flag is ABANDON and some of
the specified structures are already in the archive file
and others do not exist in the CSS, then <archive
structure networks> should signal error 200 or 405."
pass/fail depending on (Error 200 or 405 signalled from <archive
all structures>)
close archive file = arid
END PROGRAM 3