6bc5671491
Apply: git diff --full-index --binary anaconda-23.19.10-1..anaconda-25.20.9-1 And resolve conflicts. QubesOS/qubes-issues#2574
534 lines
28 KiB
HTML
Executable File
534 lines
28 KiB
HTML
Executable File
|
|
|
|
<!DOCTYPE html>
|
|
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
|
|
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
|
|
<head>
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>tests.storage.cases package — Anaconda 25.14 documentation</title>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="top" title="Anaconda 25.14 documentation" href="../index.html"/>
|
|
<link rel="up" title="tests.storage package" href="tests.storage.html"/>
|
|
<link rel="prev" title="tests.storage package" href="tests.storage.html"/>
|
|
|
|
|
|
<script src="../_static/js/modernizr.min.js"></script>
|
|
|
|
</head>
|
|
|
|
<body class="wy-body-for-nav" role="document">
|
|
|
|
<div class="wy-grid-for-nav">
|
|
|
|
|
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
|
<div class="wy-side-scroll">
|
|
<div class="wy-side-nav-search">
|
|
|
|
|
|
|
|
<a href="../index.html" class="icon icon-home"> Anaconda
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
<div class="version">
|
|
25.14
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div role="search">
|
|
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
|
<input type="text" name="q" placeholder="Search docs" />
|
|
<input type="hidden" name="check_keywords" value="yes" />
|
|
<input type="hidden" name="area" value="default" />
|
|
</form>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
|
|
|
|
|
|
|
<ul class="current">
|
|
<li class="toctree-l1"><a class="reference internal" href="../intro.html">Introduction to Anaconda</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../release.html">Building a Release</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../boot-options.html">Anaconda Boot Options</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../kickstart.html">Anaconda Kickstart Documentation</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../commit-log.html">Rules for commit messages</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../driverdisc.html">Brief description of DriverDisc version 3</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../iscsi.html">iSCSI and Anaconda</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../multipath.html">Multipath and Anaconda</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../modules.html">pyanaconda</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../testing.html">Testing</a></li>
|
|
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">tests</a><ul class="current">
|
|
<li class="toctree-l2 current"><a class="reference internal" href="tests.html">tests package</a><ul class="current">
|
|
<li class="toctree-l3 current"><a class="reference internal" href="tests.html#subpackages">Subpackages</a><ul class="current">
|
|
<li class="toctree-l4"><a class="reference internal" href="tests.dd_tests.html">tests.dd_tests package</a></li>
|
|
<li class="toctree-l4"><a class="reference internal" href="tests.dracut_tests.html">tests.dracut_tests package</a></li>
|
|
<li class="toctree-l4"><a class="reference internal" href="tests.gettext_tests.html">tests.gettext_tests package</a></li>
|
|
<li class="toctree-l4"><a class="reference internal" href="tests.glade.html">tests.glade package</a></li>
|
|
<li class="toctree-l4"><a class="reference internal" href="tests.gui.html">tests.gui package</a></li>
|
|
<li class="toctree-l4"><a class="reference internal" href="tests.lib.html">tests.lib package</a></li>
|
|
<li class="toctree-l4"><a class="reference internal" href="tests.pyanaconda_tests.html">tests.pyanaconda_tests package</a></li>
|
|
<li class="toctree-l4"><a class="reference internal" href="tests.regex_tests.html">tests.regex_tests package</a></li>
|
|
<li class="toctree-l4 current"><a class="reference internal" href="tests.storage.html">tests.storage package</a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l3"><a class="reference internal" href="tests.html#submodules">Submodules</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="tests.html#module-tests.usercustomize">tests.usercustomize module</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="tests.html#module-tests">Module contents</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
|
|
|
|
|
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
|
<a href="../index.html">Anaconda</a>
|
|
</nav>
|
|
|
|
|
|
|
|
<div class="wy-nav-content">
|
|
<div class="rst-content">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div role="navigation" aria-label="breadcrumbs navigation">
|
|
<ul class="wy-breadcrumbs">
|
|
<li><a href="../index.html">Docs</a> »</li>
|
|
|
|
<li><a href="modules.html">tests</a> »</li>
|
|
|
|
<li><a href="tests.html">tests package</a> »</li>
|
|
|
|
<li><a href="tests.storage.html">tests.storage package</a> »</li>
|
|
|
|
<li>tests.storage.cases package</li>
|
|
<li class="wy-breadcrumbs-aside">
|
|
|
|
|
|
<a href="../_sources/tests/tests.storage.cases.txt" rel="nofollow"> View page source</a>
|
|
|
|
|
|
</li>
|
|
</ul>
|
|
<hr/>
|
|
</div>
|
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
|
<div itemprop="articleBody">
|
|
|
|
<div class="section" id="tests-storage-cases-package">
|
|
<h1>tests.storage.cases package<a class="headerlink" href="#tests-storage-cases-package" title="Permalink to this headline">¶</a></h1>
|
|
<div class="section" id="submodules">
|
|
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
|
|
</div>
|
|
<div class="section" id="module-tests.storage.cases.bz1014545">
|
|
<span id="tests-storage-cases-bz1014545-module"></span><h2>tests.storage.cases.bz1014545 module<a class="headerlink" href="#module-tests.storage.cases.bz1014545" title="Permalink to this headline">¶</a></h2>
|
|
<dl class="class">
|
|
<dt id="tests.storage.cases.bz1014545.BZ1014545_TestCase">
|
|
<em class="property">class </em><code class="descclassname">tests.storage.cases.bz1014545.</code><code class="descname">BZ1014545_TestCase</code><a class="headerlink" href="#tests.storage.cases.bz1014545.BZ1014545_TestCase" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#tests.storage.cases.TestCase" title="tests.storage.cases.TestCase"><code class="xref py py-class docutils literal"><span class="pre">tests.storage.cases.TestCase</span></code></a></p>
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.bz1014545.BZ1014545_TestCase.desc">
|
|
<code class="descname">desc</code><em class="property"> = 'The members of various commands must have the correct format.\nFor instance, raid members must have mdmember, and volgroup members must have\nlvmpv. If they do not have this format, a KickstartParseError should be raised\nduring storage execution time.\n\nNote that this is different from the error condition described in the bug.\nThere, anaconda was letting the invalid format go and then hitting errors\nmuch further in installation - during bootloader installation. The real\nbug is that this condition should be detected when the kickstart storage\ncommands are being converted to actions.\n'</em><a class="headerlink" href="#tests.storage.cases.bz1014545.BZ1014545_TestCase.desc" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.bz1014545.BZ1014545_TestCase.name">
|
|
<code class="descname">name</code><em class="property"> = '1014545'</em><a class="headerlink" href="#tests.storage.cases.bz1014545.BZ1014545_TestCase.name" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
</div>
|
|
<div class="section" id="module-tests.storage.cases.bz1067707">
|
|
<span id="tests-storage-cases-bz1067707-module"></span><h2>tests.storage.cases.bz1067707 module<a class="headerlink" href="#module-tests.storage.cases.bz1067707" title="Permalink to this headline">¶</a></h2>
|
|
<dl class="class">
|
|
<dt id="tests.storage.cases.bz1067707.BZ1067707_TestCase">
|
|
<em class="property">class </em><code class="descclassname">tests.storage.cases.bz1067707.</code><code class="descname">BZ1067707_TestCase</code><a class="headerlink" href="#tests.storage.cases.bz1067707.BZ1067707_TestCase" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#tests.storage.cases.TestCase" title="tests.storage.cases.TestCase"><code class="xref py py-class docutils literal"><span class="pre">tests.storage.cases.TestCase</span></code></a></p>
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.bz1067707.BZ1067707_TestCase.desc">
|
|
<code class="descname">desc</code><em class="property"> = 'Partition lines do not necessarily require a size to be\nspecified. There are plenty of reasons why a user might not do this: putting\na filesystem on a given pre-existing partition, giving a resize or maxsize\noption, or (in this case) asking for the recommended swap size.\n'</em><a class="headerlink" href="#tests.storage.cases.bz1067707.BZ1067707_TestCase.desc" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.bz1067707.BZ1067707_TestCase.name">
|
|
<code class="descname">name</code><em class="property"> = '1067707'</em><a class="headerlink" href="#tests.storage.cases.bz1067707.BZ1067707_TestCase.name" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
</div>
|
|
<div class="section" id="module-tests.storage.cases.reuse">
|
|
<span id="tests-storage-cases-reuse-module"></span><h2>tests.storage.cases.reuse module<a class="headerlink" href="#module-tests.storage.cases.reuse" title="Permalink to this headline">¶</a></h2>
|
|
<dl class="class">
|
|
<dt id="tests.storage.cases.reuse.PartitionReuse_TestCase">
|
|
<em class="property">class </em><code class="descclassname">tests.storage.cases.reuse.</code><code class="descname">PartitionReuse_TestCase</code><a class="headerlink" href="#tests.storage.cases.reuse.PartitionReuse_TestCase" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#tests.storage.cases.TestCase" title="tests.storage.cases.TestCase"><code class="xref py py-class docutils literal"><span class="pre">tests.storage.cases.TestCase</span></code></a></p>
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.reuse.PartitionReuse_TestCase.desc">
|
|
<code class="descname">desc</code><em class="property"> = 'Test that a disk with pre-existing partitioning as a\nresult of a previous installation with partition-based autopart works.\n'</em><a class="headerlink" href="#tests.storage.cases.reuse.PartitionReuse_TestCase.desc" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.reuse.PartitionReuse_TestCase.name">
|
|
<code class="descname">name</code><em class="property"> = 'PartitionReuse'</em><a class="headerlink" href="#tests.storage.cases.reuse.PartitionReuse_TestCase.name" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="class">
|
|
<dt id="tests.storage.cases.reuse.LVMReuse_TestCase">
|
|
<em class="property">class </em><code class="descclassname">tests.storage.cases.reuse.</code><code class="descname">LVMReuse_TestCase</code><a class="headerlink" href="#tests.storage.cases.reuse.LVMReuse_TestCase" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#tests.storage.cases.TestCase" title="tests.storage.cases.TestCase"><code class="xref py py-class docutils literal"><span class="pre">tests.storage.cases.TestCase</span></code></a></p>
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.reuse.LVMReuse_TestCase.desc">
|
|
<code class="descname">desc</code><em class="property"> = 'Test that a disk with pre-existing LVM partitioning as a\nresult of a previous installation with LVM-based autopart works.\n'</em><a class="headerlink" href="#tests.storage.cases.reuse.LVMReuse_TestCase.desc" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.reuse.LVMReuse_TestCase.name">
|
|
<code class="descname">name</code><em class="property"> = 'LVMReuse'</em><a class="headerlink" href="#tests.storage.cases.reuse.LVMReuse_TestCase.name" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="class">
|
|
<dt id="tests.storage.cases.reuse.BTRFSReuse_TestCase">
|
|
<em class="property">class </em><code class="descclassname">tests.storage.cases.reuse.</code><code class="descname">BTRFSReuse_TestCase</code><a class="headerlink" href="#tests.storage.cases.reuse.BTRFSReuse_TestCase" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#tests.storage.cases.TestCase" title="tests.storage.cases.TestCase"><code class="xref py py-class docutils literal"><span class="pre">tests.storage.cases.TestCase</span></code></a></p>
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.reuse.BTRFSReuse_TestCase.desc">
|
|
<code class="descname">desc</code><em class="property"> = 'Test that a disk with pre-existing BTRFS partitioning as a\nresult of a previous installation with BTRFS-based autopart works.\n'</em><a class="headerlink" href="#tests.storage.cases.reuse.BTRFSReuse_TestCase.desc" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.reuse.BTRFSReuse_TestCase.name">
|
|
<code class="descname">name</code><em class="property"> = 'BTRFSReuse'</em><a class="headerlink" href="#tests.storage.cases.reuse.BTRFSReuse_TestCase.name" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="class">
|
|
<dt id="tests.storage.cases.reuse.ThinpReuse_TestCase">
|
|
<em class="property">class </em><code class="descclassname">tests.storage.cases.reuse.</code><code class="descname">ThinpReuse_TestCase</code><a class="headerlink" href="#tests.storage.cases.reuse.ThinpReuse_TestCase" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#tests.storage.cases.TestCase" title="tests.storage.cases.TestCase"><code class="xref py py-class docutils literal"><span class="pre">tests.storage.cases.TestCase</span></code></a></p>
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.reuse.ThinpReuse_TestCase.desc">
|
|
<code class="descname">desc</code><em class="property"> = 'Test that a disk with pre-existing thinp partitioning as a\nresult of a previous installation with thinp autopart works.\n'</em><a class="headerlink" href="#tests.storage.cases.reuse.ThinpReuse_TestCase.desc" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.reuse.ThinpReuse_TestCase.name">
|
|
<code class="descname">name</code><em class="property"> = 'ThinpReuse'</em><a class="headerlink" href="#tests.storage.cases.reuse.ThinpReuse_TestCase.name" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
</div>
|
|
<div class="section" id="module-tests.storage.cases">
|
|
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-tests.storage.cases" title="Permalink to this headline">¶</a></h2>
|
|
<dl class="exception">
|
|
<dt id="tests.storage.cases.FailedTest">
|
|
<em class="property">exception </em><code class="descclassname">tests.storage.cases.</code><code class="descname">FailedTest</code><span class="sig-paren">(</span><em>got</em>, <em>expected</em><span class="sig-paren">)</span><a class="headerlink" href="#tests.storage.cases.FailedTest" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#Exception" title="(in Python v3.5)"><code class="xref py py-class docutils literal"><span class="pre">Exception</span></code></a></p>
|
|
</dd></dl>
|
|
|
|
<dl class="class">
|
|
<dt id="tests.storage.cases.ReusableTestCaseComponent">
|
|
<em class="property">class </em><code class="descclassname">tests.storage.cases.</code><code class="descname">ReusableTestCaseComponent</code><a class="headerlink" href="#tests.storage.cases.ReusableTestCaseComponent" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#tests.storage.cases.TestCaseComponent" title="tests.storage.cases.TestCaseComponent"><code class="xref py py-class docutils literal"><span class="pre">tests.storage.cases.TestCaseComponent</span></code></a></p>
|
|
<p>A version of TestCaseComponent that does not remove its disk images
|
|
after use. In this way, a later TestCaseComponent can reuse them.
|
|
This is handy for test cases that need pre-existing partitioning.</p>
|
|
<p>See further comments in ReusingTestCaseComponent.</p>
|
|
<p>Create a new TestCaseComponent instance. This __init__ method should
|
|
typically do very little. However, subclasses must be sure to set
|
|
self.disksToCreate. This attribute is a list of (disk name, blivet.Size)
|
|
tuples that will be used in this test. Disks given in this list will
|
|
be automatically created by setupDisks and destroyed by tearDownDisks.</p>
|
|
<dl class="method">
|
|
<dt id="tests.storage.cases.ReusableTestCaseComponent.tearDownDisks">
|
|
<code class="descname">tearDownDisks</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#tests.storage.cases.ReusableTestCaseComponent.tearDownDisks" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="class">
|
|
<dt id="tests.storage.cases.ReusingTestCaseComponent">
|
|
<em class="property">class </em><code class="descclassname">tests.storage.cases.</code><code class="descname">ReusingTestCaseComponent</code><span class="sig-paren">(</span><em>reusedComponents=None</em><span class="sig-paren">)</span><a class="headerlink" href="#tests.storage.cases.ReusingTestCaseComponent" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#tests.storage.cases.TestCaseComponent" title="tests.storage.cases.TestCaseComponent"><code class="xref py py-class docutils literal"><span class="pre">tests.storage.cases.TestCaseComponent</span></code></a></p>
|
|
<p>A version of TestCaseComponent that reuses existing disk images
|
|
rather than create its own. It will, however, delete these disk images
|
|
after use.</p>
|
|
<p>This class knows which disk images to reuse by the reusedComponents
|
|
parameter passed in at object instantiation. This is a list of other
|
|
TestCaseComponent instances. This class will reuse all disk images
|
|
from each instance in that list, in the order given.</p>
|
|
<p>A typical pipeline of components would thus look like this:</p>
|
|
<blockquote>
|
|
<div><dl class="docutils">
|
|
<dt>class ComponentA(ReusableTestCaseComponent):</dt>
|
|
<dd>...</dd>
|
|
<dt>class ComponentB(ReusingTestCaseComponent):</dt>
|
|
<dd>...</dd>
|
|
</dl>
|
|
<p>ComponentA -> ComponentB</p>
|
|
</div></blockquote>
|
|
<p>A component may also derive from both, if it’s in the middle of the
|
|
pipeline:</p>
|
|
<blockquote>
|
|
<div><dl class="docutils">
|
|
<dt>class ComponentA(ReusableTestCaseComponent):</dt>
|
|
<dd>...</dd>
|
|
<dt>class ComponentB(ReusableTestCaseComponent, ReusingTestCaseComponent):</dt>
|
|
<dd>...</dd>
|
|
<dt>class ComponentC(ReusingTestCaseComponent):</dt>
|
|
<dd>...</dd>
|
|
</dl>
|
|
<p>ComponentA -> ComponentB -> ComponentC</p>
|
|
</div></blockquote>
|
|
<p>Create a new ReusingTestCaseComponent. reusedComponents is a list
|
|
of other TestCaseComponent objects that this instance should make
|
|
use of. All disk images in that list will be used by this instance,
|
|
and all will be cleaned up at the end of the test.</p>
|
|
<dl class="method">
|
|
<dt id="tests.storage.cases.ReusingTestCaseComponent.setupDisks">
|
|
<code class="descname">setupDisks</code><span class="sig-paren">(</span><em>ksdata</em><span class="sig-paren">)</span><a class="headerlink" href="#tests.storage.cases.ReusingTestCaseComponent.setupDisks" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="class">
|
|
<dt id="tests.storage.cases.TestCase">
|
|
<em class="property">class </em><code class="descclassname">tests.storage.cases.</code><code class="descname">TestCase</code><a class="headerlink" href="#tests.storage.cases.TestCase" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.5)"><code class="xref py py-class docutils literal"><span class="pre">object</span></code></a></p>
|
|
<p>A TestCase is a way of grouping related TestCaseComponent objects
|
|
together into a single place. It provides a way of iterating through
|
|
all these components, running each, and tabulating the results. If any
|
|
component fails, the entire TestCase fails.</p>
|
|
<p>Class attributes:</p>
|
|
<dl class="docutils">
|
|
<dt>desc – A description of what this test is supposed to be</dt>
|
|
<dd>testing.</dd>
|
|
</dl>
|
|
<p>name – An identifying string given to this TestCase.
|
|
platforms – A list of blivet.platform.Platform subclasses that this</p>
|
|
<blockquote>
|
|
<div>TestCase is valid for. This TestCase will only run on
|
|
matching platforms. If the list is empty, it is assumed
|
|
to be valid for all platforms.</div></blockquote>
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.TestCase.desc">
|
|
<code class="descname">desc</code><em class="property"> = ''</em><a class="headerlink" href="#tests.storage.cases.TestCase.desc" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.TestCase.name">
|
|
<code class="descname">name</code><em class="property"> = ''</em><a class="headerlink" href="#tests.storage.cases.TestCase.name" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.TestCase.platforms">
|
|
<code class="descname">platforms</code><em class="property"> = []</em><a class="headerlink" href="#tests.storage.cases.TestCase.platforms" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="tests.storage.cases.TestCase.run">
|
|
<code class="descname">run</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#tests.storage.cases.TestCase.run" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Iterate over all components, running each, and collecting the
|
|
results.</p>
|
|
</dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="class">
|
|
<dt id="tests.storage.cases.TestCaseComponent">
|
|
<em class="property">class </em><code class="descclassname">tests.storage.cases.</code><code class="descname">TestCaseComponent</code><a class="headerlink" href="#tests.storage.cases.TestCaseComponent" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.5)"><code class="xref py py-class docutils literal"><span class="pre">object</span></code></a></p>
|
|
<p>A TestCaseComponent is one individual test that runs as part of a TestCase.
|
|
It consists of a set of disk images provided by self.disksToCreate, a
|
|
kickstart storage snippet provided by self.ks, and an expected error
|
|
condition provided by self.expectedExceptionType and self.expectedExceptionText.
|
|
If the TestCaseComponent is expected to succeed, these latter two should
|
|
just be set to None.</p>
|
|
<p>A TestCaseComponent succeeds in the following cases:</p>
|
|
<ul class="simple">
|
|
<li>No exception is encountered, and self.expectedExceptionType is None.</li>
|
|
</ul>
|
|
<p>A TestCaseComponent fails in all other cases.</p>
|
|
<p>Class attributes:</p>
|
|
<p>name – An identifying string given to this TestCaseComponent.</p>
|
|
<p>Create a new TestCaseComponent instance. This __init__ method should
|
|
typically do very little. However, subclasses must be sure to set
|
|
self.disksToCreate. This attribute is a list of (disk name, blivet.Size)
|
|
tuples that will be used in this test. Disks given in this list will
|
|
be automatically created by setupDisks and destroyed by tearDownDisks.</p>
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.TestCaseComponent.expectedExceptionText">
|
|
<code class="descname">expectedExceptionText</code><a class="headerlink" href="#tests.storage.cases.TestCaseComponent.expectedExceptionText" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Should this test component be expected to fail, this property returns
|
|
a regular expression that the raised exception’s text must match.
|
|
Otherwise, this property returns None. All components that are
|
|
expected to fail should override this property.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.TestCaseComponent.expectedExceptionType">
|
|
<code class="descname">expectedExceptionType</code><a class="headerlink" href="#tests.storage.cases.TestCaseComponent.expectedExceptionType" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Should this test component be expected to fail, this property returns
|
|
the exception type. If this component is not expected to fail, this
|
|
property returns None. All components that are expected to fail
|
|
should override this property.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.TestCaseComponent.ks">
|
|
<code class="descname">ks</code><a class="headerlink" href="#tests.storage.cases.TestCaseComponent.ks" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Return the storage-specific portion of a kickstart file used for
|
|
performing this test. The kickstart snippet must be provided as
|
|
text. Only storage commands will be tested. No bootloader actions
|
|
will be performed.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="tests.storage.cases.TestCaseComponent.name">
|
|
<code class="descname">name</code><em class="property"> = ''</em><a class="headerlink" href="#tests.storage.cases.TestCaseComponent.name" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="tests.storage.cases.TestCaseComponent.setupDisks">
|
|
<code class="descname">setupDisks</code><span class="sig-paren">(</span><em>ksdata</em><span class="sig-paren">)</span><a class="headerlink" href="#tests.storage.cases.TestCaseComponent.setupDisks" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Create all disk images given by self.disksToCreate and initialize
|
|
the storage module. Subclasses may override this method, but they
|
|
should be sure to call the base method as well.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="tests.storage.cases.TestCaseComponent.tearDownDisks">
|
|
<code class="descname">tearDownDisks</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#tests.storage.cases.TestCaseComponent.tearDownDisks" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Disable any disk images used by this test component and remove their
|
|
image files from the host system. Subclasses may override this
|
|
method, but they should call the base method as well to make sure
|
|
the images get destroyed.</p>
|
|
</dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<footer>
|
|
|
|
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
|
|
|
|
|
<a href="tests.storage.html" class="btn btn-neutral" title="tests.storage package" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
|
|
|
</div>
|
|
|
|
|
|
<hr/>
|
|
|
|
<div role="contentinfo">
|
|
<p>
|
|
© Copyright 2015, Red Hat, Inc..
|
|
|
|
</p>
|
|
</div>
|
|
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
var DOCUMENTATION_OPTIONS = {
|
|
URL_ROOT:'../',
|
|
VERSION:'25.14',
|
|
COLLAPSE_INDEX:false,
|
|
FILE_SUFFIX:'.html',
|
|
HAS_SOURCE: true
|
|
};
|
|
</script>
|
|
<script type="text/javascript" src="../_static/jquery.js"></script>
|
|
<script type="text/javascript" src="../_static/underscore.js"></script>
|
|
<script type="text/javascript" src="../_static/doctools.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
jQuery(function () {
|
|
SphinxRtdTheme.StickyNav.enable();
|
|
});
|
|
</script>
|
|
|
|
|
|
</body>
|
|
</html> |