From e373a5eb07c6ca9e12ff32e9e8964e1d00647e43 Mon Sep 17 00:00:00 2001 From: Jonathan Maw Date: Fri, 3 Aug 2012 10:57:33 +0100 Subject: Number and restructure luc management test cases Test cases are restructured into: * Description * Test Commands * Desired behaviour and Output --- .../test-luc-management.xml | 334 ++++++++++++--------- 1 file 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 - Registration of a simple dictionary + 1. Registration of a simple dictionary Description @@ -149,147 +149,211 @@ systemctl restart node-startup-controller.service - Registration does not happen on an isolated RegisterWithLUC() call - - register "{1: ['app2.unit']}" - - Read the DLT log and verify this entry doesn't appear: - - - APID CTID Payload - - - NSC- CTRL [The new context is: "{1: ['app2.unit']}"] - - - - + 2. Registration does not happen on an isolated RegisterWithLUC() call + + Description + + Attempts to register an application by calling + RegisterWithLUC() all by itself. Restarts the Node Startup + Controller and verifies that the last user context hasn't changed. + + + + Test Commands + register "{1: ['app2.unit']}" + +systemctl restart node-startup-controller.service + + + + Desired behaviour and output + + The DLT log should now contain the following log messages: + + + + APID CTID Payload + + + NSC- CTRL [Starting LUC group: 0] + NSC- CTRL [Starting LUC app: app1.unit] + NSC- CTRL [Finished starting LUC app: app1.unit] + NSC- CTRL [Finished starting LUC group: 0] + + + - An isolated FinishLUCRegistration() call will not change the LUC - - end - systemctl restart node-startup-controller.service - - Read the DLT log and verify these entries appear: - - - APID CTID Payload - - - NSC- CTRL [start group 0] - NSC- CTRL [start app 'app1.unit'] - - - - + 3. An isolated FinishLUCRegistration() call will not change the LUC + + Description + + Calls FinishLUCRegistration() without having started + registration or registered any apps with it. Restarts the Node Startup Controller + to verify that the LUC hasn't changed. + + + + Test Commands + end + +systemctl restart node-startup-controller.service + + + + Desired behaviour and output + + The DLT log should now contain the following log messages: + + + + APID CTID Payload + + + NSC- CTRL [Starting LUC group: 0] + NSC- CTRL [Starting LUC app: app1.unit] + NSC- CTRL [Finished starting LUC app: app1.unit] + NSC- CTRL [Finished starting LUC group: 0] + + + - Registration of a complex dictionary - - begin - register "{0: ['app1.unit'], 1: ['app1.unit', 'app3.unit'], 2: ['app2.unit']}" - end - - Read the DLT log and verify these entries appear: - - - APID CTID Payload - - - NSC- CTRL [The new context is: "{0: ['app1.unit'], 1: ['app1.unit', 'app3.unit'], 2: ['app2.unit']}"] - - - - systemctl restart node-startup-controller.service - - Read the DLT log and verify these entries appear: - - - APID CTID Payload - - - NSC- CTRL [start group 0] - NSC- CTRL [start app 'app1.unit'] - NSC- CTRL [start group 1] - NSC- CTRL [start app 'app1.unit'] - NSC- CTRL [start app 'app3.unit'] - NSC- CTRL [start group 2] - NSC- CTRL [start app 'app2.unit'] - - - - + 4. Registration of a complex dictionary + + Description + + 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. + + + + Test Commands + begin +register "{0: ['app1.unit'], 1: ['app1.unit', 'app3.unit'], 2: ['app2.unit']}" +end + +systemctl restart node-startup-controller.service + + + + Desired behaviour and Output + + The start order of LUC groups may be different depending on the build-time + configuration of the Node Startup Controller in the test system. + + + The DLT log should now contain the following messages + + + + APID CTID Payload + + + NSC- CTRL [Updated LUC to: "{0: ['app1.unit'], 1: ['app1.unit', 'app3.unit'], 2: ['app2.unit']}"] + NSC- CTRL [Starting LUC group: 0] + NSC- CTRL [Starting LUC app: app1.unit] + NSC- CTRL [Finished starting LUC app: app1.unit] + NSC- CTRL [Finished starting LUC group: 0] + NSC- CTRL [Starting LUC group: 1] + NSC- CTRL [Starting LUC app: app1.unit] + NSC- CTRL [Finished starting LUC app: app1.unit] + NSC- CTRL [Starting LUC app: app3.unit] + NSC- CTRL [Finished starting LUC app: app3.unit] + NSC- CTRL [Finished starting LUC group: 1] + NSC- CTRL [Starting LUC group: 2] + NSC- CTRL [Starting LUC app: app2.unit] + NSC- CTRL [Finished starting LUC app: app2.unit] + NSC- CTRL [Finished starting LUC group: 2] + + + - Registration can happen with a series of RegisterWithLUC() calls - - begin - register "{0: ['app1.unit']}" - register "{1: ['app3.unit']}" - end - - Read the DLT log and verify these entries appear: - - - APID CTID Payload - - - NSC- CTRL [The new context is: "{0: ['app1.unit']}"] - NSC- CTRL [The new context is: "{0: ['app1.unit'], 1: ['app3.unit']}"] - - - - systemctl restart node-startup-controller.service - - Read the DLT log and verify these entries appear: - - - APID CTID Payload - - - NSC- CTRL [start group 0] - NSC- CTRL [start app 'app1.unit'] - NSC- CTRL [start group 1] - NSC- CTRL [start app 'app3.unit'] - - - - + 5. Registration can happen with a series of RegisterWithLUC() calls + + Description + + Registers multiple applications to the LUC in a series of + RegisterWithLUC() calls. Restarts the Node Startup Controller + and verifies that the apps added in each call are started in the correct order. + + + + Test commands + begin +register "{0: ['app1.unit']}" +register "{1: ['app3.unit']}" +end + +systemctl restart node-startup-controller.service + + + + Desired behaviour and Output + + The DLT log should now contain the following log messages: + + + + APID CTID Payload + + + NSC- CTRL [Updated LUC to: "{0: ['app1.unit']}"] + NSC- CTRL [Updated LUC to: "{0: ['app1.unit'], 1: ['app3.unit']}"] + NSC- CTRL [Starting LUC group: 0] + NSC- CTRL [Starting LUC app: app1.unit] + NSC- CTRL [Finished starting LUC app: app1.unit] + NSC- CTRL [Finished starting LUC group: 0] + NSC- CTRL [Starting LUC group: 1] + NSC- CTRL [Starting LUC app: app3.unit] + NSC- CTRL [Finished starting LUC app: app3.unit] + NSC- CTRL [Finished starting LUC group: 1] + + + - Repeated registration of an app changes the order in the LUC - - begin - register "{1: ['app1.unit', 'app2.unit']}" - register "{1: ['app1.unit']}" - end - - Read the DLT logs and verify these entries appear: - - - APID CTID Payload - - - NSC- CTRL [The new context is: "{1: ['app1.unit', 'app2.unit']}"] - NSC- CTRL [The new context is: "{1: ['app2.unit', 'app1.unit']}"] - - - - systemctl restart node-startup-controller.service - - Read the DLT log and verify these entries appear: - - - APID CTID Payload - - - NSC- CTRL [start group 1] - NSC- CTRL [start app 'app2.unit'] - NSC- CTRL [start app 'app1.unit'] - - - - + 6. Repeated registration of an app changes the order in the LUC + + Description + + 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. + + + + Test Commands + begin +register "{1: ['app1.unit', 'app2.unit']}" +register "{1: ['app1.unit']}" +end + +systemctl restart node-startup-controller.service + + + + Desired behaviour and Output + + The DLT log should now contain the following log messages: + + + + APID CTID Payload + + + NSC- CTRL [Updated LUC to: "{1: ['app1.unit', 'app2.unit']}"] + NSC- CTRL [Updated LUC to: "{1: ['app2.unit', 'app1.unit']}"] + NSC- CTRL [Starting LUC group: 1] + NSC- CTRL [Starting LUC app: app2.unit] + NSC- CTRL [Finished starting LUC app: app2.unit] + NSC- CTRL [Starting LUC app: app1.unit] + NSC- CTRL [Finished starting LUC app: app1.unit] + NSC- CTRL [Finished starting LUC group: 1] + + + -- cgit v1.2.1