Commit 2c2d529
test(backup): run the backup manager tests on the local backend (#11188)
`ic-backup` replays each replica version's artifacts with that version's
own `ic-replay` and sandbox binaries, and downloads them from
`download.dfinity.systems` when `binaries/<version>/` doesn't already
hold them. The backup tests pre-seeded that directory for the branch
version only, so the mainnet version — which both tests replay, as the
initial version of the upgrade test and as the target version of the
downgrade test — was still downloaded, unverified, at test time.
Two commits, so the backend switch can be reverted on its own if the
nightly job dislikes it:
1. **Seeding.** Take the mainnet binaries from `@mainnet_nns_binaries`
and seed the directory of every version that will be replayed: the
initial, the target and the branch version. One code path covers both
tests, which is necessary because they share `backup_manager_test_bin`
and `test()` cannot tell them apart. A version we have no binaries for
now fails immediately, naming the versions we do have, instead of
stalling for the whole test timeout on a download that cannot succeed.
`copy_file` also checks that what it copies is executable — a dependency
that lost its `+x` bit would otherwise only surface minutes later, as
`ic-replay` failing to spawn its sandbox.
2. **Drop `backend = "farm"`**, since nothing in these tests reaches the
network any more.
Only the `_local` variants change tagging. The plain Farm variant is
already `manual` via `colocate`, and `_colocate` is unaffected.
### Verification
Both pass on the local backend, well inside the 25-minute per-test
timeout set in `backup_manager_test.rs`:
```
//rs/tests/consensus/backup:backup_manager_upgrade_test_local PASSED in 917.0s
//rs/tests/consensus/backup:backup_manager_downgrade_test_local PASSED in 883.9s
```
Each log shows both versions seeded (`0000…0000` for the unstamped
branch build and `798712972b1e…` for mainnet), several successful
replays across a detected version change, and **no**
`download.dfinity.systems` anywhere. Since the `_local` sandbox has no
network, a download that was still needed would have failed the test
outright.
The downgrade direction is worth a second look from a reviewer:
`guestos_update = "mainnet_nns"` appears exactly once in the repo, so
this is its first run on the local backend.
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 85a29e8 commit 2c2d529
2 files changed
Lines changed: 92 additions & 53 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | 54 | | |
| 55 | + | |
64 | 56 | | |
65 | 57 | | |
66 | 58 | | |
| |||
69 | 61 | | |
70 | 62 | | |
71 | 63 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 64 | + | |
75 | 65 | | |
76 | 66 | | |
77 | 67 | | |
78 | 68 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | 69 | | |
| 70 | + | |
86 | 71 | | |
87 | 72 | | |
88 | 73 | | |
89 | 74 | | |
90 | 75 | | |
91 | 76 | | |
92 | 77 | | |
93 | | - | |
94 | | - | |
95 | | - | |
| 78 | + | |
96 | 79 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
67 | 88 | | |
68 | 89 | | |
69 | 90 | | |
| |||
139 | 160 | | |
140 | 161 | | |
141 | 162 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
170 | 210 | | |
171 | 211 | | |
172 | 212 | | |
| |||
488 | 528 | | |
489 | 529 | | |
490 | 530 | | |
491 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
492 | 548 | | |
493 | 549 | | |
494 | 550 | | |
| |||
0 commit comments