Skip to content

Commit

Permalink
Backup test should refresh pod spec before assert.
Browse files Browse the repository at this point in the history
  • Loading branch information
draghuram committed Jan 28, 2020
1 parent 3ab2ab5 commit e2c385a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/src/test_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,11 @@ def test_backup(globalconfig, resources):
if not backup_pod:
raise Exception("Could not find a completed or running backup")

resources["backup_pod_name"] = backup_pod.metadata.name
pod_name = backup_pod.metadata.name
resources["backup_pod_name"] = pod_name

if backup_pod.status.phase == "Running":
pod = kubeclient.wait_for_pod_to_be_done(backup_pod.metadata.name)
pod = kubeclient.wait_for_pod_to_be_done(pod_name)
backup_pod = globalconfig.pod_api.get(pod_name)

assert backup_pod.status.phase == "Succeeded"

0 comments on commit e2c385a

Please # to comment.