-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: run all e2e tests against sandbox #2891
Merged
Merged
Changes from 8 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
5a319e4
test: run all e2e tests against sandbox
spypsy 4435d2e
fix cli test
spypsy 291d835
no sandbox for benchmark tests
spypsy 347ee2f
fix remaining tests
spypsy a07087d
Run canary tests using sandbox docker-compose.yml
spypsy 6661e67
fix #2917
spypsy ca5b32d
Merge branch 'master' into spy/sandbox-for-all-e2e
spypsy 2907005
Merge branch 'master' into spy/sandbox-for-all-e2e
spypsy f4c69e4
update tests to work locally as well
spypsy 3b6b5a2
Merge branch 'master' into spy/sandbox-for-all-e2e
spypsy 53880d1
Merge branch 'master' into spy/sandbox-for-all-e2e
PhilWindle 614583c
Merge branch 'master' into spy/sandbox-for-all-e2e
PhilWindle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,9 @@ | ||
version: '3' | ||
services: | ||
fork: | ||
image: ghcr.io/foundry-rs/foundry:nightly-a44aa13cfc23491ba32aaedc093e9488c1a6db43 | ||
entrypoint: > | ||
sh -c ' | ||
if [ -n "$FORK_BLOCK_NUMBER" ] && [ -n "$FORK_URL" ]; then | ||
exec anvil -p 8545 --host 0.0.0.0 --chain-id 31337 --fork-url "$FORK_URL" --fork-block-number "$FORK_BLOCK_NUMBER" | ||
else | ||
exec anvil -p 8545 --host 0.0.0.0 --chain-id 31337 | ||
fi' | ||
ports: | ||
- '8545:8545' | ||
|
||
sandbox: | ||
image: aztecprotocol/aztec-sandbox:canary | ||
environment: | ||
DEBUG: 'aztec:*' | ||
ETHEREUM_HOST: http://fork:8545 | ||
CHAIN_ID: 31337 | ||
ARCHIVER_POLLING_INTERVAL_MS: 50 | ||
P2P_BLOCK_CHECK_INTERVAL_MS: 50 | ||
SEQ_TX_POLLING_INTERVAL_MS: 50 | ||
WS_BLOCK_CHECK_INTERVAL_MS: 50 | ||
PXE_BLOCK_POLLING_INTERVAL_MS: 50 | ||
ARCHIVER_VIEM_POLLING_INTERVAL_MS: 500 | ||
ports: | ||
- '8080:8080' | ||
|
||
canary: | ||
image: aztecprotocol/canary:latest | ||
environment: | ||
ETHEREUM_HOST: http://fork:8545 | ||
ETHEREUM_HOST: http://ethereum:8545 | ||
CHAIN_ID: 31337 | ||
PXE_URL: http://sandbox:8080 | ||
PXE_URL: http://aztec:8080 | ||
command: ['./scripts/start_e2e_ci_browser.sh', './src/aztec_js_browser.test.ts'] |
36 changes: 0 additions & 36 deletions
36
yarn-project/canary/scripts/docker-compose-e2e-sandbox.yml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,9 @@ | ||
version: '3' | ||
services: | ||
fork: | ||
image: ghcr.io/foundry-rs/foundry:nightly-a44aa13cfc23491ba32aaedc093e9488c1a6db43 | ||
entrypoint: > | ||
sh -c ' | ||
if [ -n "$FORK_BLOCK_NUMBER" ] && [ -n "$FORK_URL" ]; then | ||
exec anvil -p 8545 --host 0.0.0.0 --chain-id 31337 --fork-url "$FORK_URL" --fork-block-number "$FORK_BLOCK_NUMBER" | ||
else | ||
exec anvil -p 8545 --host 0.0.0.0 --chain-id 31337 | ||
fi' | ||
ports: | ||
- '8545:8545' | ||
|
||
sandbox: | ||
image: aztecprotocol/aztec-sandbox:canary | ||
environment: | ||
DEBUG: 'aztec:*' | ||
ETHEREUM_HOST: http://fork:8545 | ||
CHAIN_ID: 31337 | ||
ARCHIVER_POLLING_INTERVAL_MS: 50 | ||
P2P_BLOCK_CHECK_INTERVAL_MS: 50 | ||
SEQ_TX_POLLING_INTERVAL_MS: 50 | ||
WS_BLOCK_CHECK_INTERVAL_MS: 50 | ||
PXE_BLOCK_POLLING_INTERVAL_MS: 50 | ||
ARCHIVER_VIEM_POLLING_INTERVAL_MS: 500 | ||
ports: | ||
- '8080:8080' | ||
|
||
canary: | ||
image: aztecprotocol/canary:latest | ||
environment: | ||
ETHEREUM_HOST: http://fork:8545 | ||
ETHEREUM_HOST: http://ethereum:8545 | ||
CHAIN_ID: 31337 | ||
PXE_URL: http://sandbox:8080 | ||
command: ${TEST:-./src/uniswap_trade_on_l1_from_l2.test.ts} | ||
PXE_URL: http://aztec:8080 | ||
command: ${TEST:-./src/cli.test.ts} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,23 @@ | ||
import { startHttpRpcServer } from '@aztec/aztec-sandbox'; | ||
import { PXE, createDebugLogger } from '@aztec/aztec.js'; | ||
import { createPXERpcServer } from '@aztec/pxe'; | ||
|
||
import { setup as e2eSetup } from './fixtures/utils.js'; | ||
import { cliTestSuite } from './shared/cli.js'; | ||
|
||
const HTTP_PORT = 9009; | ||
const RPC_URL = `http://localhost:${HTTP_PORT}`; | ||
const { PXE_URL } = process.env; | ||
const debug = createDebugLogger('aztec:e2e_cli'); | ||
|
||
let http: ReturnType<typeof startHttpRpcServer>; | ||
let pxe: PXE; | ||
let teardown: () => Promise<void>; | ||
|
||
const testSetup = async () => { | ||
const context = await e2eSetup(2); | ||
debug(`Environment set up`); | ||
({ pxe, teardown } = context); | ||
http = startHttpRpcServer(pxe, createPXERpcServer, HTTP_PORT); | ||
debug(`HTTP RPC server started in port ${HTTP_PORT}`); | ||
return pxe; | ||
}; | ||
|
||
const testCleanup = async () => { | ||
http.close(); | ||
await teardown(); | ||
}; | ||
|
||
cliTestSuite('E2E CLI Test', testSetup, testCleanup, createDebugLogger('aztec:e2e_cli'), RPC_URL); | ||
cliTestSuite('E2E CLI Test', testSetup, testCleanup, createDebugLogger('aztec:e2e_cli'), PXE_URL); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking. People can still run the e2e tests without the sandbox can't they? Previously if you didn't specify the
PXE_URL
then it would create a local setup. Is that still possible?This looks like it forces the test to use sandbox accounts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that's a good point. Most will still work, some that require slightly different methods (like here) will need conditional checks. Will fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in f4c69e4