diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2012-08-03 10:57:33 +0100 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-08-03 12:00:25 +0100 |
commit | e373a5eb07c6ca9e12ff32e9e8964e1d00647e43 (patch) | |
tree | f53fce3312e8df615efcfb313de070e9cdfcb0d6 | |
parent | 10678852f3395fabfafcba7e9066efb8f0842e3d (diff) | |
download | node-startup-controller-e373a5eb07c6ca9e12ff32e9e8964e1d00647e43.tar.gz |
Number and restructure luc management test cases
Test cases are restructured into:
* Description
* Test Commands
* Desired behaviour and Output
-rw-r--r-- | docs/reference/node-startup-controller/test-luc-management.xml | 334 |
1 files changed, 199 insertions, 135 deletions
diff --git a/docs/reference/node-startup-controller/test-luc-management.xml b/docs/reference/node-startup-controller/test-luc-management.xml index 059309e..b15f25f 100644 --- a/docs/reference/node-startup-controller/test-luc-management.xml +++ b/docs/reference/node-startup-controller/test-luc-management.xml @@ -112,7 +112,7 @@ systemctl start node-startup-controller.service</programlisting> </refsect1> <refsect1 id="test-luc-register-simple"> - <title id="test-luc-register-simple-title">Registration of a simple dictionary</title> + <title id="test-luc-register-simple-title">1. Registration of a simple dictionary</title> <refsect2> <title>Description</title> <para> @@ -149,147 +149,211 @@ systemctl restart node-startup-controller.service</programlisting> </refsect2> </refsect1> <refsect1 id="test-luc-register-only"> - <title id="test-luc-register-only-title">Registration does not happen on an isolated RegisterWithLUC() call</title> - <orderedlist continuation="continues"> - <listitem><programlisting>register "{1: ['app2.unit']}"</programlisting></listitem> - <listitem> - Read the DLT log and verify this entry <emphasis>doesn't</emphasis> appear: - <informaltable><tgroup cols="3"> - <thead> - <row> <entry>APID</entry> <entry>CTID</entry> <entry>Payload</entry> </row> - </thead> - <tbody> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[The new context is: "{1: ['app2.unit']}"]</entry></row> - </tbody> - </tgroup></informaltable> - </listitem> - </orderedlist> + <title id="test-luc-register-only-title">2. Registration does not happen on an isolated RegisterWithLUC() call</title> + <refsect2> + <title>Description</title> + <para> + Attempts to register an application by calling + <literal>RegisterWithLUC()</literal> all by itself. Restarts the Node Startup + Controller and verifies that the last user context hasn't changed. + </para> + </refsect2> + <refsect2> + <title>Test Commands</title> + <programlisting>register "{1: ['app2.unit']}" + +systemctl restart node-startup-controller.service + </programlisting> + </refsect2> + <refsect2> + <title>Desired behaviour and output</title> + <para> + The DLT log should now contain the following log messages: + </para> + <informaltable><tgroup cols="3"> + <thead> + <row> <entry>APID</entry> <entry>CTID</entry> <entry>Payload</entry> </row> + </thead> + <tbody> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC group: 0]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC app: app1.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC app: app1.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC group: 0]</entry></row> + </tbody> + </tgroup></informaltable> + </refsect2> </refsect1> <refsect1 id="tests-luc-finish-only"> - <title id="test-luc-finish-only-title">An isolated FinishLUCRegistration() call will not change the LUC</title> - <orderedlist continuation="continues"> - <listitem><programlisting>end</programlisting></listitem> - <listitem><programlisting>systemctl restart node-startup-controller.service</programlisting></listitem> - <listitem> - Read the DLT log and verify these entries appear: - <informaltable><tgroup cols="3"> - <thead> - <row> <entry>APID</entry> <entry>CTID</entry> <entry>Payload</entry> </row> - </thead> - <tbody> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[start group 0]</entry></row> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[start app 'app1.unit']</entry></row> - </tbody> - </tgroup></informaltable> - </listitem> - </orderedlist> + <title id="test-luc-finish-only-title">3. An isolated FinishLUCRegistration() call will not change the LUC</title> + <refsect2> + <title>Description</title> + <para> + Calls <literal>FinishLUCRegistration()</literal> without having started + registration or registered any apps with it. Restarts the Node Startup Controller + to verify that the LUC hasn't changed. + </para> + </refsect2> + <refsect2> + <title>Test Commands</title> + <programlisting>end + +systemctl restart node-startup-controller.service + </programlisting> + </refsect2> + <refsect2> + <title>Desired behaviour and output</title> + <para> + The DLT log should now contain the following log messages: + </para> + <informaltable><tgroup cols="3"> + <thead> + <row> <entry>APID</entry> <entry>CTID</entry> <entry>Payload</entry> </row> + </thead> + <tbody> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC group: 0]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC app: app1.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC app: app1.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC group: 0]</entry></row> + </tbody> + </tgroup></informaltable> + </refsect2> </refsect1> <refsect1 id="test-luc-register-complex"> - <title id="test-luc-register-complex-title">Registration of a complex dictionary</title> - <orderedlist continuation="continues"> - <listitem><programlisting>begin</programlisting></listitem> - <listitem><programlisting>register "{0: ['app1.unit'], 1: ['app1.unit', 'app3.unit'], 2: ['app2.unit']}"</programlisting></listitem> - <listitem><programlisting>end</programlisting></listitem> - <listitem> - Read the DLT log and verify these entries appear: - <informaltable><tgroup cols="3"> - <thead> - <row> <entry>APID</entry> <entry>CTID</entry> <entry>Payload</entry> </row> - </thead> - <tbody> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[The new context is: "{0: ['app1.unit'], 1: ['app1.unit', 'app3.unit'], 2: ['app2.unit']}"]</entry></row> - </tbody> - </tgroup></informaltable> - </listitem> - <listitem><programlisting>systemctl restart node-startup-controller.service</programlisting></listitem> - <listitem> - Read the DLT log and verify these entries appear: - <informaltable><tgroup cols="3"> - <thead> - <row> <entry>APID</entry> <entry>CTID</entry> <entry>Payload</entry> </row> - </thead> - <tbody> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[start group 0]</entry></row> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[start app 'app1.unit']</entry></row> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[start group 1]</entry></row> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[start app 'app1.unit']</entry></row> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[start app 'app3.unit']</entry></row> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[start group 2]</entry></row> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[start app 'app2.unit']</entry></row> - </tbody> - </tgroup></informaltable> - </listitem> - </orderedlist> + <title id="test-luc-register-complex-title">4. Registration of a complex dictionary</title> + <refsect2> + <title>Description</title> + <para> + Registers the Last User Context with multiple LUC groups and multiple apps in + a single LUC group. Restarts the Node Startup Controller to verify the LUC was + changed and starts the apps in the correct order. + </para> + </refsect2> + <refsect2> + <title>Test Commands</title> + <programlisting>begin +register "{0: ['app1.unit'], 1: ['app1.unit', 'app3.unit'], 2: ['app2.unit']}" +end + +systemctl restart node-startup-controller.service + </programlisting> + </refsect2> + <refsect2> + <title>Desired behaviour and Output</title> + <note> + The start order of LUC groups may be different depending on the build-time + configuration of the Node Startup Controller in the test system. + </note> + <para> + The DLT log should now contain the following messages + </para> + <informaltable><tgroup cols="3"> + <thead> + <row> <entry>APID</entry> <entry>CTID</entry> <entry>Payload</entry> </row> + </thead> + <tbody> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Updated LUC to: "{0: ['app1.unit'], 1: ['app1.unit', 'app3.unit'], 2: ['app2.unit']}"]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC group: 0]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC app: app1.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC app: app1.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC group: 0]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC group: 1]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC app: app1.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC app: app1.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC app: app3.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC app: app3.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC group: 1]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC group: 2]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC app: app2.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC app: app2.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC group: 2]</entry></row> + </tbody> + </tgroup></informaltable> + </refsect2> </refsect1> <refsect1 id="test-luc-register-series"> - <title id="test-luc-register-series-title">Registration can happen with a series of RegisterWithLUC() calls</title> - <orderedlist continuation="continues"> - <listitem><programlisting>begin</programlisting></listitem> - <listitem><programlisting>register "{0: ['app1.unit']}"</programlisting></listitem> - <listitem><programlisting>register "{1: ['app3.unit']}"</programlisting></listitem> - <listitem><programlisting>end</programlisting></listitem> - <listitem> - Read the DLT log and verify these entries appear: - <informaltable><tgroup cols="3"> - <thead> - <row> <entry>APID</entry> <entry>CTID</entry> <entry>Payload</entry> </row> - </thead> - <tbody> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[The new context is: "{0: ['app1.unit']}"]</entry></row> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[The new context is: "{0: ['app1.unit'], 1: ['app3.unit']}"]</entry></row> - </tbody> - </tgroup></informaltable> - </listitem> - <listitem><programlisting>systemctl restart node-startup-controller.service</programlisting></listitem> - <listitem> - Read the DLT log and verify these entries appear: - <informaltable><tgroup cols="3"> - <thead> - <row> <entry>APID</entry> <entry>CTID</entry> <entry>Payload</entry> </row> - </thead> - <tbody> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[start group 0]</entry></row> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[start app 'app1.unit']</entry></row> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[start group 1]</entry></row> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[start app 'app3.unit']</entry></row> - </tbody> - </tgroup></informaltable> - </listitem> - </orderedlist> + <title id="test-luc-register-series-title">5. Registration can happen with a series of RegisterWithLUC() calls</title> + <refsect2> + <title>Description</title> + <para> + Registers multiple applications to the LUC in a series of + <literal>RegisterWithLUC()</literal> calls. Restarts the Node Startup Controller + and verifies that the apps added in each call are started in the correct order. + </para> + </refsect2> + <refsect2> + <title>Test commands</title> + <programlisting>begin +register "{0: ['app1.unit']}" +register "{1: ['app3.unit']}" +end + +systemctl restart node-startup-controller.service + </programlisting> + </refsect2> + <refsect2> + <title>Desired behaviour and Output</title> + <para> + The DLT log should now contain the following log messages: + </para> + <informaltable><tgroup cols="3"> + <thead> + <row> <entry>APID</entry> <entry>CTID</entry> <entry>Payload</entry> </row> + </thead> + <tbody> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Updated LUC to: "{0: ['app1.unit']}"]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Updated LUC to: "{0: ['app1.unit'], 1: ['app3.unit']}"]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC group: 0]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC app: app1.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC app: app1.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC group: 0]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC group: 1]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC app: app3.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC app: app3.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC group: 1]</entry></row> + </tbody> + </tgroup></informaltable> + </refsect2> </refsect1> <refsect1 id="tests-luc-register-series-reorder"> - <title id="tests-luc-register-series-reorder-title">Repeated registration of an app changes the order in the LUC</title> - <orderedlist continuation="continues"> - <listitem><programlisting>begin</programlisting></listitem> - <listitem><programlisting>register "{1: ['app1.unit', 'app2.unit']}"</programlisting></listitem> - <listitem><programlisting>register "{1: ['app1.unit']}"</programlisting></listitem> - <listitem><programlisting>end</programlisting></listitem> - <listitem> - Read the DLT logs and verify these entries appear: - <informaltable><tgroup cols="3"> - <thead> - <row> <entry>APID</entry> <entry>CTID</entry> <entry>Payload</entry> </row> - </thead> - <tbody> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[The new context is: "{1: ['app1.unit', 'app2.unit']}"]</entry></row> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[The new context is: "{1: ['app2.unit', 'app1.unit']}"]</entry></row> - </tbody> - </tgroup></informaltable> - </listitem> - <listitem><programlisting>systemctl restart node-startup-controller.service</programlisting></listitem> - <listitem> - Read the DLT log and verify these entries appear: - <informaltable><tgroup cols="3"> - <thead> - <row> <entry>APID</entry> <entry>CTID</entry> <entry>Payload</entry> </row> - </thead> - <tbody> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[start group 1]</entry></row> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[start app 'app2.unit']</entry></row> - <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[start app 'app1.unit']</entry></row> - </tbody> - </tgroup></informaltable> - </listitem> - </orderedlist> + <title id="tests-luc-register-series-reorder-title">6. Repeated registration of an app changes the order in the LUC</title> + <refsect2> + <title>Description</title> + <para> + Registers two applications, then registers the first application again. Restarts + the Node Startup Controller to verify that the order the applications start is + changed by the second registration. + </para> + </refsect2> + <refsect2> + <title>Test Commands</title> + <programlisting>begin +register "{1: ['app1.unit', 'app2.unit']}" +register "{1: ['app1.unit']}" +end + +systemctl restart node-startup-controller.service + </programlisting> + </refsect2> + <refsect2> + <title>Desired behaviour and Output</title> + <para> + The DLT log should now contain the following log messages: + </para> + <informaltable><tgroup cols="3"> + <thead> + <row> <entry>APID</entry> <entry>CTID</entry> <entry>Payload</entry> </row> + </thead> + <tbody> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Updated LUC to: "{1: ['app1.unit', 'app2.unit']}"]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Updated LUC to: "{1: ['app2.unit', 'app1.unit']}"]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC group: 1]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC app: app2.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC app: app2.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Starting LUC app: app1.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC app: app1.unit]</entry></row> + <row><entry>NSC-</entry> <entry>CTRL</entry> <entry>[Finished starting LUC group: 1]</entry></row> + </tbody> + </tgroup></informaltable> + </refsect2> </refsect1> </refentry> |