Skip to content

Commit 7952b21

Browse files
committed
test(e2e): thread opts through TokenContractTest + NestedContractTest and migrate to FAST_E2E_SETUP_OPTS
1 parent 5f3b0fd commit 7952b21

16 files changed

Lines changed: 41 additions & 23 deletions

yarn-project/end-to-end/src/e2e_nested_contract/importer.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { ImportTestContract } from '@aztec/noir-test-contracts.js/ImportTest';
22
import { TestContract } from '@aztec/noir-test-contracts.js/Test';
33

4+
import { FAST_E2E_SETUP_OPTS } from '../fixtures/fixtures.js';
45
import { NestedContractTest } from './nested_contract_test.js';
56

67
describe('e2e_nested_contract manual', () => {
@@ -10,7 +11,7 @@ describe('e2e_nested_contract manual', () => {
1011
let { wallet, logger, defaultAccountAddress } = t;
1112

1213
beforeAll(async () => {
13-
await t.setup();
14+
await t.setup({ ...FAST_E2E_SETUP_OPTS });
1415
({ wallet, logger, defaultAccountAddress } = t);
1516
});
1617

yarn-project/end-to-end/src/e2e_nested_contract/manual_private_call.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
import { FAST_E2E_SETUP_OPTS } from '../fixtures/fixtures.js';
12
import { NestedContractTest } from './nested_contract_test.js';
23

34
describe('e2e_nested_contract manual', () => {
45
const t = new NestedContractTest('manual');
56
let { parentContract, childContract, defaultAccountAddress } = t;
67

78
beforeAll(async () => {
8-
await t.setup();
9+
await t.setup({ ...FAST_E2E_SETUP_OPTS });
910
await t.applyManual();
1011
({ parentContract, childContract, defaultAccountAddress } = t);
1112
});

yarn-project/end-to-end/src/e2e_nested_contract/manual_private_enqueue.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Fr } from '@aztec/aztec.js/fields';
33
import { ChildContract } from '@aztec/noir-test-contracts.js/Child';
44
import { ParentContract } from '@aztec/noir-test-contracts.js/Parent';
55

6+
import { FAST_E2E_SETUP_OPTS } from '../fixtures/fixtures.js';
67
import { NestedContractTest } from './nested_contract_test.js';
78

89
describe('e2e_nested_contract manual_enqueue', () => {
@@ -14,7 +15,7 @@ describe('e2e_nested_contract manual_enqueue', () => {
1415

1516
beforeAll(async () => {
1617
// We don't deploy contracts in beforeAll because every test requires a fresh setup
17-
await t.setup();
18+
await t.setup({ ...FAST_E2E_SETUP_OPTS });
1819
({ wallet, defaultAccountAddress, aztecNode } = t);
1920
});
2021

yarn-project/end-to-end/src/e2e_nested_contract/manual_public.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Fr } from '@aztec/aztec.js/fields';
44
import { toBigIntBE } from '@aztec/foundation/bigint-buffer';
55
import { serializeToBuffer } from '@aztec/foundation/serialize';
66

7+
import { FAST_E2E_SETUP_OPTS } from '../fixtures/fixtures.js';
78
import { NestedContractTest } from './nested_contract_test.js';
89

910
describe('e2e_nested_contract manual', () => {
@@ -14,7 +15,7 @@ describe('e2e_nested_contract manual', () => {
1415
aztecNode.getPublicStorageAt('latest', child.address, new Fr(1));
1516

1617
beforeAll(async () => {
17-
await t.setup();
18+
await t.setup({ ...FAST_E2E_SETUP_OPTS });
1819
await t.applyManual();
1920
({ wallet, parentContract, childContract, defaultAccountAddress, aztecNode } = t);
2021
});

yarn-project/end-to-end/src/e2e_nested_contract/nested_contract_test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { ParentContract } from '@aztec/noir-test-contracts.js/Parent';
77

88
import {
99
type EndToEndContext,
10+
type SetupOptions,
1011
deployAccounts,
1112
publicDeployAccounts,
1213
setup,
@@ -50,9 +51,10 @@ export class NestedContractTest {
5051
await publicDeployAccounts(this.wallet, [this.defaultAccountAddress]);
5152
}
5253

53-
async setup() {
54+
async setup(opts: Partial<SetupOptions> = {}) {
5455
this.logger.info('Setting up fresh subsystems');
5556
this.context = await setup(0, {
57+
...opts,
5658
fundSponsoredFPC: true,
5759
skipAccountDeployment: true,
5860
});

yarn-project/end-to-end/src/e2e_token_contract/access_control.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
import { FAST_E2E_SETUP_OPTS } from '../fixtures/fixtures.js';
12
import { TokenContractTest } from './token_contract_test.js';
23

34
describe('e2e_token_contract access control', () => {
45
const t = new TokenContractTest('access_control');
56

67
beforeAll(async () => {
78
t.applyBaseSnapshots();
8-
await t.setup();
9+
await t.setup({ ...FAST_E2E_SETUP_OPTS });
910
});
1011

1112
afterAll(async () => {

yarn-project/end-to-end/src/e2e_token_contract/burn.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { computeAuthWitMessageHash } from '@aztec/aztec.js/authorization';
22
import { Fr } from '@aztec/aztec.js/fields';
33

44
import { sendThroughAuthwitProxy, simulateThroughAuthwitProxy } from '../fixtures/authwit_proxy.js';
5-
import { DUPLICATE_NULLIFIER_ERROR, U128_UNDERFLOW_ERROR } from '../fixtures/index.js';
5+
import { DUPLICATE_NULLIFIER_ERROR, FAST_E2E_SETUP_OPTS, U128_UNDERFLOW_ERROR } from '../fixtures/index.js';
66
import { TokenContractTest } from './token_contract_test.js';
77

88
describe('e2e_token_contract burn', () => {
@@ -12,7 +12,7 @@ describe('e2e_token_contract burn', () => {
1212
beforeAll(async () => {
1313
t.applyBaseSnapshots();
1414
t.applyMintSnapshot();
15-
await t.setup();
15+
await t.setup({ ...FAST_E2E_SETUP_OPTS });
1616
// Have to destructure again to ensure we have latest refs.
1717
({ asset, wallet, adminAddress, tokenSim, adminAddress, account1Address } = t);
1818
});

yarn-project/end-to-end/src/e2e_token_contract/minting.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { U128_OVERFLOW_ERROR } from '../fixtures/fixtures.js';
1+
import { FAST_E2E_SETUP_OPTS, U128_OVERFLOW_ERROR } from '../fixtures/fixtures.js';
22
import { TokenContractTest } from './token_contract_test.js';
33

44
describe('e2e_token_contract minting', () => {
@@ -7,7 +7,7 @@ describe('e2e_token_contract minting', () => {
77

88
beforeAll(async () => {
99
t.applyBaseSnapshots();
10-
await t.setup();
10+
await t.setup({ ...FAST_E2E_SETUP_OPTS });
1111
({ asset, tokenSim, adminAddress, account1Address } = t);
1212
});
1313

yarn-project/end-to-end/src/e2e_token_contract/private_transfer_recursion.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { BlockNumber } from '@aztec/foundation/branded-types';
22
import { TokenContract, type Transfer } from '@aztec/noir-contracts.js/Token';
33

4+
import { FAST_E2E_SETUP_OPTS } from '../fixtures/fixtures.js';
45
import { mintNotes } from '../fixtures/token_utils.js';
56
import { TokenContractTest } from './token_contract_test.js';
67

@@ -10,7 +11,7 @@ describe('e2e_token_contract private transfer recursion', () => {
1011

1112
beforeAll(async () => {
1213
t.applyBaseSnapshots();
13-
await t.setup();
14+
await t.setup({ ...FAST_E2E_SETUP_OPTS });
1415
({ asset, wallet, adminAddress, account1Address, node } = t);
1516
});
1617

yarn-project/end-to-end/src/e2e_token_contract/reading_constants.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { readFieldCompressedString } from '@aztec/aztec.js/utils';
22

3+
import { FAST_E2E_SETUP_OPTS } from '../fixtures/fixtures.js';
34
import { TokenContractTest } from './token_contract_test.js';
45

56
describe('e2e_token_contract reading constants', () => {
@@ -8,7 +9,7 @@ describe('e2e_token_contract reading constants', () => {
89

910
beforeAll(async () => {
1011
t.applyBaseSnapshots();
11-
await t.setup();
12+
await t.setup({ ...FAST_E2E_SETUP_OPTS });
1213
});
1314

1415
afterAll(async () => {

0 commit comments

Comments
 (0)