Durable, beneficiary-bound subaddress index reservation
This commit is contained in:
@@ -3,6 +3,7 @@ import assert from 'node:assert/strict';
|
||||
import { assertCustodyDbActionAllowedOnNetwork, assertMainnetSchemaMigrationAcknowledged,
|
||||
assertMainnetCustodyOperationAcknowledged, assertPilotCustodyActionAllowed,
|
||||
assertPilotSchemaMigrationAcknowledged, assertPilotCustodyIdentityAcknowledged,
|
||||
assertPilotReservationGrantAcknowledged,
|
||||
parseCustodyDbArguments } from '../server/market/custody-db-args.ts';
|
||||
|
||||
test('custody database CLI parses two-argument deposit operations without shifting arguments', () => {
|
||||
@@ -61,6 +62,7 @@ test('mainnet reviewed deposit operations require exact credit-only acknowledgem
|
||||
test('pilot custody CLI permits only additive schema migration and identity-only initialization', () => {
|
||||
assert.doesNotThrow(() => assertPilotCustodyActionAllowed('migrate-pilot-schema', true));
|
||||
assert.doesNotThrow(() => assertPilotCustodyActionAllowed('initialize-pilot-custody-identity', true));
|
||||
assert.doesNotThrow(() => assertPilotCustodyActionAllowed('grant-pilot-deposit-reservation-runtime', true));
|
||||
assert.throws(() => assertPilotCustodyActionAllowed('grant-monero-observer-runtime', true), /only pilot schema migration/);
|
||||
assert.throws(() => assertPilotCustodyActionAllowed('deposit-stage-credit', true), /only pilot schema migration/);
|
||||
assert.throws(() => assertPilotCustodyActionAllowed('initialize-pilot-custody-identity', false), /requires the pilot profile/);
|
||||
@@ -72,6 +74,9 @@ test('pilot custody CLI permits only additive schema migration and identity-only
|
||||
'initialize-pilot-custody-v1', 'reviewed-credit-only'), /no-funds acknowledgements/);
|
||||
assert.doesNotThrow(() => assertPilotCustodyIdentityAcknowledged('initialize-pilot-custody-identity',
|
||||
'initialize-pilot-custody-v1', 'identity-only-no-funds'));
|
||||
assert.throws(() => assertPilotReservationGrantAcknowledged('grant-pilot-deposit-reservation-runtime', undefined), /acknowledgement/);
|
||||
assert.throws(() => assertPilotReservationGrantAcknowledged('grant-pilot-deposit-reservation-runtime', 'reviewed-credit-only'), /acknowledgement/);
|
||||
assert.doesNotThrow(() => assertPilotReservationGrantAcknowledged('grant-pilot-deposit-reservation-runtime', 'reservation-only-no-addresses'));
|
||||
});
|
||||
|
||||
test('custody database CLI rejects unknown, missing, empty, and excess arguments', () => {
|
||||
|
||||
Reference in New Issue
Block a user