Skip to content

Commit 5d2f5ef

Browse files
committed
test(cli): register os migrate record-currency-codes in the two command-family rosters
The confirmation-exit pin and the bootSchemaStack one-shot family both discover their members from the tree; the new command joins each. Claude-Session: https://claude.ai/code/session_01Utp6CbJa6hKdimkAau1nbA Co-authored-by: Claude <noreply@anthropic.com>
1 parent 0f5c7f1 commit 5d2f5ef

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

‎packages/cli/src/utils/schema-migrate.one-shot-family.integration.test.ts‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ import MigrateMeta from '../commands/migrate/meta.js';
7171
import MigrateMultiValueColumns from '../commands/migrate/multi-value-columns.js';
7272
import MigrateOrganizationOwnership from '../commands/migrate/organization-ownership.js';
7373
import MigratePlan from '../commands/migrate/plan.js';
74+
import MigrateRecordCurrencyCodes from '../commands/migrate/record-currency-codes.js';
7475
import MigrateRecordedBy from '../commands/migrate/recorded-by.js';
7576
import MigrateResume from '../commands/migrate/resume.js';
7677
import MigrateSecurityCatalogOverlays from '../commands/migrate/security-catalog-overlays.js';
@@ -270,6 +271,20 @@ const CALLERS: Record<string, Caller> = {
270271
noWrite: [{ label: 'migrate recorded-by', argv: ['--database-url', '@DB@', '--json'] }],
271272
write: [{ label: 'migrate recorded-by --apply', argv: ['--apply', '--yes', '--database-url', '@DB@', '--json'] }],
272273
},
274+
'commands/migrate/record-currency-codes.ts': {
275+
run: invoke(MigrateRecordCurrencyCodes),
276+
// The fixture's app declares no record-mode amount, so the backfill
277+
// refuses `status` (INVALID_FIELD) after the boot and writes nothing.
278+
// The boot is what these cases are about.
279+
noWrite: [{
280+
label: 'migrate record-currency-codes',
281+
argv: ['--object', 'osf_lead', '--field', 'status', '--code', 'USD', '--database-url', '@DB@', '--json'],
282+
}],
283+
write: [{
284+
label: 'migrate record-currency-codes --apply',
285+
argv: ['--apply', '--yes', '--object', 'osf_lead', '--field', 'status', '--code', 'USD', '--database-url', '@DB@', '--json'],
286+
}],
287+
},
273288
'commands/migrate/resume.ts': {
274289
run: invoke(MigrateResume),
275290
noWrite: [{ label: 'migrate resume', argv: ['--database-url', '@DB@', '--json'] }],

‎packages/cli/test/migrate-confirmation-exit.pin.test.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,11 @@ const ROSTER: Record<string, Member> = {
275275
},
276276
writes: () => [seams.resumeMigrationJournal],
277277
},
278+
'record-currency-codes': {
279+
argv: ['--apply', '--object', 'opportunity', '--field', 'amount', '--code', 'USD'],
280+
confirm: '--yes',
281+
writes: BOOT,
282+
},
278283
'security-catalog-overlays': { argv: ['--apply'], confirm: '--yes', writes: BOOT },
279284
'summary-nulls': { argv: ['--apply'], confirm: '--yes', writes: BOOT },
280285
'value-shapes': { argv: ['--apply'], confirm: '--yes', writes: BOOT },

0 commit comments

Comments
 (0)