Skip to content

Commit

Permalink
Merge branch 'RamenDR:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Shwetha-Acharya authored Jul 26, 2023
2 parents fff8142 + 445836a commit 72774af
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ jobs:
${{env.DOCKERCMD}} load -i /tmp/ramen-operator.tar
- name: Login to Quay
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
Expand Down
2 changes: 1 addition & 1 deletion test/addons/volsync/test
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def run_replication(cluster):
"replicationsource/busybox-src",
output="jsonpath={.status.lastManualSync}",
namespace=NAMESPACE,
timeout=60,
timeout=120,
profile=cluster,
)

Expand Down
13 changes: 8 additions & 5 deletions test/drenv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ def wait_for(
using `kubectl wait`.
To wait for a specific part of the resource specify a kubectl output
specficiation (e.g. output="jsonpath={.status.phase}"). The function
specification (e.g. output="jsonpath={.status.phase}"). The function
returns when the output is non empty.
Returns the resource .metadata.name, or if output was specified, the
specified outpout for the resource.
specified output for the resource.
Raises RuntimeError if the resource does not exist within the specified
timeout.
Expand All @@ -45,18 +45,21 @@ def wait_for(
out = kubectl.get(*args, context=profile)
if out:
elapsed = time.monotonic() - start
log(f"{resource} outuput={output} found in {elapsed:.2f} seconds")
log(f"{resource!r} output={output!r} found in {elapsed:.2f} seconds")
return out

if time.monotonic() > deadline:
raise RuntimeError(f"Timeout waiting for {resource}")
raise RuntimeError(
f"Timeout waiting for {resource!r} output={output!r} "
f"namespace={namespace!r} profile={profile!r} timeout={timeout}"
)

time.sleep(delay)


def template(path):
"""
Retrun a string.Template with contents of path.
Return a string.Template with contents of path.
"""
with open(path) as f:
return string.Template(f.read())
Expand Down

0 comments on commit 72774af

Please sign in to comment.