Skip to content

Commit

Permalink
Update testing docs
Browse files Browse the repository at this point in the history
Signed-off-by: c3y1huang <[email protected]>
  • Loading branch information
c3y1huang committed Dec 5, 2023
1 parent 34bfd9a commit 0fa8584
Show file tree
Hide file tree
Showing 3 changed files with 402 additions and 11 deletions.
22 changes: 11 additions & 11 deletions integration/common.html
Original file line number Diff line number Diff line change
Expand Up @@ -4091,17 +4091,17 @@ <h1 class="title">Module <code>tests.common</code></h1>
wait_volume_kubernetes_status(client, volume.name, ks)


def create_pvc_for_volume(client, core_api, volume, pvc_name):
volume.pvcCreate(namespace=&#34;default&#34;, pvcName=pvc_name)
def create_pvc_for_volume(client, core_api, volume, pvc_name, pvc_namespace=&#34;default&#34;): # NOQA
volume.pvcCreate(namespace=pvc_namespace, pvcName=pvc_name)
for i in range(RETRY_COUNTS):
if check_pvc_existence(core_api, pvc_name):
if check_pvc_existence(core_api, pvc_name, pvc_namespace):
break
time.sleep(RETRY_INTERVAL)
assert check_pvc_existence(core_api, pvc_name)
assert check_pvc_existence(core_api, pvc_name, pvc_namespace)

ks = {
&#39;pvStatus&#39;: &#39;Bound&#39;,
&#39;namespace&#39;: &#39;default&#39;,
&#39;namespace&#39;: pvc_namespace,
&#39;lastPVCRefAt&#39;: &#39;&#39;,
}
wait_volume_kubernetes_status(client, volume.name, ks)
Expand Down Expand Up @@ -7691,25 +7691,25 @@ <h2 id="returns">Returns</h2>
</details>
</dd>
<dt id="tests.common.create_pvc_for_volume"><code class="name flex">
<span>def <span class="ident">create_pvc_for_volume</span></span>(<span>client, core_api, volume, pvc_name)</span>
<span>def <span class="ident">create_pvc_for_volume</span></span>(<span>client, core_api, volume, pvc_name, pvc_namespace='default')</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def create_pvc_for_volume(client, core_api, volume, pvc_name):
volume.pvcCreate(namespace=&#34;default&#34;, pvcName=pvc_name)
<pre><code class="python">def create_pvc_for_volume(client, core_api, volume, pvc_name, pvc_namespace=&#34;default&#34;): # NOQA
volume.pvcCreate(namespace=pvc_namespace, pvcName=pvc_name)
for i in range(RETRY_COUNTS):
if check_pvc_existence(core_api, pvc_name):
if check_pvc_existence(core_api, pvc_name, pvc_namespace):
break
time.sleep(RETRY_INTERVAL)
assert check_pvc_existence(core_api, pvc_name)
assert check_pvc_existence(core_api, pvc_name, pvc_namespace)

ks = {
&#39;pvStatus&#39;: &#39;Bound&#39;,
&#39;namespace&#39;: &#39;default&#39;,
&#39;namespace&#39;: pvc_namespace,
&#39;lastPVCRefAt&#39;: &#39;&#39;,
}
wait_volume_kubernetes_status(client, volume.name, ks)</code></pre>
Expand Down
5 changes: 5 additions & 0 deletions integration/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ <h2 class="section-title" id="header-submodules">Sub-modules</h2>
<dd>
<div class="desc"></div>
</dd>
<dt><code class="name"><a title="tests.test_metric" href="test_metric.html">tests.test_metric</a></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt><code class="name"><a title="tests.test_migration" href="test_migration.html">tests.test_migration</a></code></dt>
<dd>
<div class="desc"></div>
Expand Down Expand Up @@ -197,6 +201,7 @@ <h1>Index</h1>
<li><code><a title="tests.test_ha" href="test_ha.html">tests.test_ha</a></code></li>
<li><code><a title="tests.test_infra" href="test_infra.html">tests.test_infra</a></code></li>
<li><code><a title="tests.test_kubernetes" href="test_kubernetes.html">tests.test_kubernetes</a></code></li>
<li><code><a title="tests.test_metric" href="test_metric.html">tests.test_metric</a></code></li>
<li><code><a title="tests.test_migration" href="test_migration.html">tests.test_migration</a></code></li>
<li><code><a title="tests.test_node" href="test_node.html">tests.test_node</a></code></li>
<li><code><a title="tests.test_orphan" href="test_orphan.html">tests.test_orphan</a></code></li>
Expand Down
Loading

0 comments on commit 0fa8584

Please sign in to comment.