Commit a723606
authored
[DPE-10625] select valid backup entry in restore integration test (#1840)
test_restore_on_new_cluster selected a backup ID from the list-backups
output by positional index (backups.split("\n")[-3]), assuming the last
two entries are always restore/timeline records. When the output
contains a different number of such entries, the selected line is
itself a timeline entry, which fails with "Cannot restore to the
timeline without restore-to-time parameter".
Parse the pipe-delimited output instead and select only lines whose
action column contains "backup" (full/differential/incremental),
and include action.results in the restore assertion message.
Backport of canonical/postgresql-k8s-operator#1552.
Assisted-by: Claude:claude-5-fable1 parent 9b17fd3 commit a723606
1 file changed
Lines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
136 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
137 | 150 | | |
138 | 151 | | |
139 | 152 | | |
140 | 153 | | |
141 | 154 | | |
142 | | - | |
| 155 | + | |
143 | 156 | | |
144 | 157 | | |
145 | 158 | | |
| |||
0 commit comments