Skip to content
Snippets Groups Projects
Forked from tests / apertis-test-cases
576 commits behind the upstream repository.
test_file1.html 4.87 KiB
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <title>sanity-check</title>
  </head>
  <body>
    
    <main role="main" class="container" style="margin-top: 40px; margin-bottom: 40px">
      <h2>sanity-check <small class="text-muted">all</small></h2>
      <h3><span class="badge badge-danger">critical</span></h3>

      <div class="card" style="margin-top: 20px">
	<div class="card-body">
	  <dl class="row">
	    <dt class="col-sm-3">Image Type:</dt>
	    <dd class="col-sm-9">any</dd>
	    <dt class="col-sm-3">Image Architecture:</dt>
	    <dd class="col-sm-9">any</dd>
	    <dt class="col-sm-3">Type:</dt>
	    <dd class="col-sm-9">sanity</dd>
	  </dl>

      <h4>Description</h4>
      <p>This test checks that the system bus is up, that a user session is created and that a graphical interface is successfully running in the system, as well as other similar basic services so that a stable and reliable environment can be confirmed before futher tests are executed. Basic functionality: services.</p>

      

      
      <hr />
      <h4>Pre Conditions</h4>
      <ol>
      
      
      
      
      
      <li class="mb-sm-2">A second system with a terminal and git available on it. This test must be executed before other tests and even before installing other packages in the image, so the script to execute this test should be fetched from a different machine.</li>
      
      
      
      
      <li class="mb-sm-2">Clone the apertis-tests repository in the second system:</li>
      
      
      
      
      
      <p><kbd>$ git clone https://gitlab.apertis.org/infrastructure/apertis-tests.git</kbd></p>
      
      
      
      <li class="mb-sm-2">Copy the apertis-tests folder to the Apertis system. Since the Apertis image runs sshd by default, you can easily copy this file using the scp utility from the second machine, for this you will need the Apertis image IP, which you can find running the ip command from Apertis:</li>
      
      
      
      
      
      <p><kbd>$ ip addr</kbd></p>
      
      
      
      <li class="mb-sm-2">Replace &lt;APERTIS_IMAGE_IP&gt; by the found IP and copy the apertis-tests repository using scp from the second system where the apertis-tests repository was cloned. It would look like this:</li>
      
      
      
      
      
      <p><kbd>$ tar cf apertis-tests.tar apertis-tests/ &amp;&amp; scp apertis-tests.tar user@&lt;APERTIS_IMAGE_IP&gt;:/home/user/</kbd></p>
      
      
      
      <li class="mb-sm-2">Alternatively, you can copy the apertis-tests directory in other ways, for example by using an external storage device, manually mounting the device and copying the folder. It is recommended and expected that you use scp from a second machine.</li>
      
      
      
      
      <li class="mb-sm-2">Once the apertis-tests folder is available in the Apertis image, unpack it in the apertis home user directory:</li>
      
      
      
      
      
      <p><kbd>$ tar xf apertis-tests.tar</kbd></p>
      
      
      
      <li class="mb-sm-2">Enter the apertis-tests directory</li>
      
      
      
      
      
      <p><kbd>$ cd apertis-tests/</kbd></p>
      
      
      
      </ol>
      

      <hr />
      <h4>Execution Steps</h4>
      <ol>
      
      <li class="mb-sm-2"> Execute the following command:</li>
      
      
      
      
      <p><kbd>$ common/sanity-check</kbd></p>
      
      
      </ol>

      <hr />
      <h4>Expected</h4>
      
      <p class="mt-sm-3">The command should report no failure and its output should be something like this at the end:</p>
      
      
      
      
      
      
      
      <p class="mb-sm-0 pl-sm-3"><samp>+ grep -E ^NAME=(&#34;?)Apertis\1$ /etc/os-release</samp></p><p class="mb-sm-0 pl-sm-3"><samp>NAME=&#34;Apertis&#34;</samp></p><p class="mb-sm-0 pl-sm-3"><samp>+ grep -E ^ID=(&#34;?)apertis\1$ /etc/os-release</samp></p><p class="mb-sm-0 pl-sm-3"><samp>ID=apertis</samp></p><p class="mb-sm-0 pl-sm-3"><samp>+ id -u user</samp></p><p class="mb-sm-0 pl-sm-3"><samp>+ test -S /run/user/1000/wayland-0</samp></p><p class="mb-sm-0 pl-sm-3"><samp>+ set +x</samp></p><p class="mb-sm-0 pl-sm-3"><samp># Sanity check successful</samp></p>
      
      
      

      

	</div>
      </div>

      
      <div class="card" style="margin-top: 30px">
	<div class="card-body">
      <h4>Notes</h4>
      <ul>
      
      <li class="mb-sm-2">IMPORTANT: If this test fails for an image, NO further tests should be executed on that image, since this invalidates all test results.</li>
      
      
      
      
      <li class="mb-sm-2">This test must be executed in an image before running either automated or manual tests.</li>
      
      
      
      
      </ul>
        </div>
      </div>
      
    </main>

  </body>
</html>