summaryrefslogtreecommitdiff
path: root/docs/reference/node-startup-controller/test-example.xml
blob: dbd645ff7327cdca575d1ec9d5aa05f4d4adc8d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
                          "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
]>

<section id="test-example">
  <title> Example test</title>
  <para>
    An example of how tests should be structured
  </para>

  <section>
    <title>Test environment and setup</title>
    <para>
      Automated testing isn't possible. To make things easier, we have code snippets which 
      can be copied exactly, to get the required result.
      <programlisting>
        cp /lib/systemd/system/{graphical,focussed}.target
        systemctl start boot-manager.target
      </programlisting>
    </para>
  </section>
  
  <section>
    <title>Test Overview</title>
    <para>
      A broad explanation of the different test cases in the scenario, i.e.
      <itemizedlist>
        <listitem>Add a shutdown client</listitem>
        <listitem>Tell the shutdown client to shut down</listitem>
      </itemizedlist>
    </para>
  </section>

  <section>
    <title>Test steps</title>
    <para>
    Add a shutdown client
    <orderedlist>
      <listitem><programlisting>/usr/local/lib/boot-manager-1/legacy-app-handler -u cups.service -m 1</programlisting></listitem>
      <listitem>Check the DLT log for appropriate output</listitem>
    </orderedlist>
    Tell the shutdown client to shut down
    <orderedlist continuation="continues">
      <listitem><programlisting>kill -HUP $(pidof nsm-dummy)</programlisting></listitem>
      <listitem>Check the DLT log for appropriate output</listitem>
    </orderedlist>
    </para>
  </section>

</section>