Commit 46c7962
test: Verify migrated revision status is set correctly
Add explicit test assertions to verify that the BoxcutterStorageMigrator
sets the Succeeded=True status condition with the Migrated reason when
creating revisions from Helm releases.
This ensures the migration fix works correctly by:
- Verifying Status().Update() is called during migration
- Asserting the Succeeded condition is set to True
- Confirming the reason is ClusterExtensionRevisionReasonMigrated
- Validating the message and ObservedGeneration are correct
Also adds missing k8s.io/apimachinery/pkg/api/meta import to boxcutter.go
that was needed for the meta.SetStatusCondition call.
The test now captures the status update in a persistent statusWriterMock
instance, allowing verification of the status condition that prevents the
timing gap issue during OLM upgrades.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 0f9ea71 commit 46c7962
2 files changed
Lines changed: 28 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
1251 | 1252 | | |
1252 | 1253 | | |
1253 | 1254 | | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
1254 | 1270 | | |
1255 | 1271 | | |
1256 | 1272 | | |
| |||
1345 | 1361 | | |
1346 | 1362 | | |
1347 | 1363 | | |
| 1364 | + | |
1348 | 1365 | | |
1349 | 1366 | | |
1350 | 1367 | | |
| |||
1363 | 1380 | | |
1364 | 1381 | | |
1365 | 1382 | | |
1366 | | - | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
1367 | 1387 | | |
1368 | 1388 | | |
1369 | 1389 | | |
1370 | | - | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
1371 | 1393 | | |
1372 | 1394 | | |
1373 | 1395 | | |
1374 | | - | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
1375 | 1399 | | |
1376 | 1400 | | |
1377 | 1401 | | |
| |||
0 commit comments