Skip to content

Commit

Permalink
fix remaining tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spypsy committed Oct 18, 2023
1 parent 291d835 commit 347ee2f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_run_script end-to-end ./scripts/run_tests_local e2e_p2p_network.test.ts
command: cond_run_script end-to-end ./scripts/run_tests_local e2e_p2p_network.test.ts ./scripts/docker-compose-no-sandbox.yml
environment: { DEBUG: "aztec:*" }

e2e-browser-sandbox:
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/end-to-end/src/e2e_card_game.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AccountWallet, AztecAddress, Wallet, deployInitialSandboxAccounts } from '@aztec/aztec.js';
import { AccountWallet, AztecAddress, Wallet, getSandboxAccountsWallets } from '@aztec/aztec.js';
import { DebugLogger } from '@aztec/foundation/log';
import { CardGameContract } from '@aztec/noir-contracts/types';
import { PXE } from '@aztec/types';
Expand Down Expand Up @@ -65,7 +65,7 @@ describe('e2e_card_game', () => {
// Card stats are derived from the users' private keys, so to get consistent values, we set up the
// initial sandbox accounts that always use the same private keys, instead of random ones.
({ pxe, logger, teardown } = await setup(0));
wallets = await Promise.all((await deployInitialSandboxAccounts(pxe)).map(a => a.account.getWallet()));
wallets = await getSandboxAccountsWallets(pxe);
[firstPlayerWallet, secondPlayerWallet, thirdPlayerWallet] = wallets;
[firstPlayer, secondPlayer, thirdPlayer] = wallets.map(a => a.getAddress());
await deployContract();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
Wallet,
computeMessageSecretHash,
generatePublicKey,
getSandboxAccountsWallets,
getSchnorrAccount,
} from '@aztec/aztec.js';
import { Fr, GrumpkinScalar } from '@aztec/foundation/fields';
Expand Down Expand Up @@ -44,7 +45,13 @@ describe('e2e_multiple_accounts_1_enc_key', () => {

// Verify that all accounts use the same encryption key
const encryptionPublicKey = await generatePublicKey(encryptionPrivateKey);
for (const account of await pxe.getRegisteredAccounts()) {
// Disregard sandbox accounts
const sandBoxWallets = await getSandboxAccountsWallets(pxe);
const allAccounts = await pxe.getRegisteredAccounts();
const keyAccounts = allAccounts.filter(
acc => !sandBoxWallets.map(wlt => wlt.getAddress().toString()).includes(acc.address.toString()),
);
for (const account of keyAccounts) {
expect(account.publicKey).toEqual(encryptionPublicKey);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('archiver integration with l1 to l2 messages', () => {
let accounts: CompleteAddress[];
({ teardown, wallet, deployL1ContractsValues, accounts, config, logger } = await setup(2));
config.archiverPollingIntervalMS = 100;
archiver = await Archiver.createAndSync(config);
archiver = await Archiver.createAndSync({ ...config, l1Contracts: deployL1ContractsValues.l1ContractAddresses });

const walletClient = deployL1ContractsValues.walletClient;
publicClient = deployL1ContractsValues.publicClient;
Expand Down

0 comments on commit 347ee2f

Please sign in to comment.