Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
27fecfc
chore: add testcontainer packages
viraj124 Jan 23, 2025
d37fef0
chore: generate new fuel wallets during setup
viraj124 Jan 23, 2025
5d2b8ce
chore: make minor adjustments in existing docker files
viraj124 Jan 23, 2025
79df68f
feat: add testcontainers setup
viraj124 Jan 23, 2025
1aa882f
test: add testcontainer integration in non-fork tests
viraj124 Jan 23, 2025
414b372
chore: resolve merge conflict
viraj124 Jan 23, 2025
1f0c731
feat: integrate fork tests with testcontainer
viraj124 Jan 23, 2025
f98dae6
test: small touchups
viraj124 Jan 23, 2025
48446e6
chore: delete current docker setup related files
viraj124 Jan 24, 2025
28d5f1a
chore: remove container start command
viraj124 Jan 24, 2025
518c950
chore: update commands in upgrade test suite ci
viraj124 Jan 24, 2025
8d473b7
feat: testcontainers integration for remaining tests
viraj124 Jan 24, 2025
cd6a3a0
chore: add changeset
viraj124 Jan 24, 2025
6d431b9
chore: update comments
viraj124 Jan 24, 2025
7b7c495
chore: debug ci
viraj124 Jan 24, 2025
14fd01b
chore: formatting
viraj124 Jan 24, 2025
5fab8da
fix: ts linting
viraj124 Jan 24, 2025
ca02355
chore: testcontainer integration in ci
viraj124 Jan 27, 2025
a613ea1
chore: more ci updates
viraj124 Jan 27, 2025
01fbad2
chore: add wait strategy for l1 container
viraj124 Jan 27, 2025
8b14d68
chore: remove healthcheck
viraj124 Jan 27, 2025
bdd0f71
chore: comment out deployment serve port
viraj124 Jan 27, 2025
efb6ff2
chore: more l1 container updates
viraj124 Jan 27, 2025
96d04c9
chore: add logging
viraj124 Jan 27, 2025
c95d34b
chore: fix ts linting
viraj124 Jan 27, 2025
9eac428
chore: add debug arg in ci
viraj124 Jan 27, 2025
8466c8d
chore: remove env args in ci
viraj124 Jan 27, 2025
4c3499e
chore: add typing and revert debugging changes
viraj124 Jan 27, 2025
91e35e9
chore: remove logging
viraj124 Jan 27, 2025
9d6d49b
fix: remove shell scripting to build docker images
viraj124 Jan 28, 2025
3ff9141
chore: rename vars
viraj124 Jan 28, 2025
a3af6ec
chore: add shell scripts to run tests in parallel
viraj124 Feb 5, 2025
1e5f69b
refactor: use different host ports for each test
viraj124 Feb 5, 2025
e2b3e75
chore: remove default config values in setup
viraj124 Feb 5, 2025
115aa64
chore: add logging
viraj124 Feb 5, 2025
0ff4409
chore: resolve merge conflicts
viraj124 Feb 20, 2025
b11e4bd
feat: optimise run time for integration tests
viraj124 Feb 20, 2025
0ee5371
chore: resolve more conflicts
viraj124 Feb 20, 2025
51fb107
chore: revert workflow changes
viraj124 Feb 20, 2025
db6485f
chore: revert test setup updates
viraj124 Feb 20, 2025
75d0a8c
chore: remove unused shell scripts
viraj124 Feb 20, 2025
ab41329
chore: add changeset
viraj124 Feb 20, 2025
d29e677
Merge branch 'main' into viraj124/389-run-integration-tests-parallel
viraj124 Feb 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/fair-gorillas-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@fuel-bridge/solidity-contracts': minor
'@fuel-bridge/test-utils': minor
---

optimise run time for integration tests"
2 changes: 1 addition & 1 deletion .github/workflows/upgrade-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
working-directory: docker/envs
- name: Run integration tests on a L1 fork after upgrading contracts
run: |
pnpm run test:integration:fork
pnpm run test:integration:fork
7 changes: 1 addition & 6 deletions packages/integration-tests/fork-tests/bridge_erc20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import type {
Provider,
} from 'fuels';

import { startContainers, stopEnvironment } from '../docker-setup/docker';
import { startContainers } from '../docker-setup/docker';
import { fundWithdrawalTransactionWithBaseAssetResource } from '../utils/utils';

const { expect } = chai;
Expand Down Expand Up @@ -726,9 +726,4 @@ describe('Bridging ERC20 tokens', async function () {
).to.be.true;
});
});

// stopping containers post the test
after(async () => {
await stopEnvironment();
});
});
5 changes: 1 addition & 4 deletions packages/integration-tests/fork-tests/transfer_eth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type {
Provider,
} from 'fuels';

import { startContainers, stopEnvironment } from '../docker-setup/docker';
import { stopEnvironment } from '../docker-setup/docker';

const { expect } = chai;

Expand Down Expand Up @@ -133,9 +133,6 @@ describe('Transferring ETH', async function () {
}

before(async () => {
// spinning up all docker containers
await startContainers();

env = await setupEnvironment({});
BASE_ASSET_ID = env.fuel.provider.getBaseAssetId();
});
Expand Down
4 changes: 4 additions & 0 deletions packages/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
"scripts": {
"test": "pnpm mocha -b -r ts-node/register 'tests/**/*.ts'",
"test-fork": "pnpm mocha -b -r ts-node/register 'fork-tests/**/*.ts'",
"test:fork:erc20": "pnpm mocha -b -r ts-node/register 'fork-tests/bridge_erc20.ts'",
"test:fork:transfer": "pnpm mocha -b -r ts-node/register 'fork-tests/transfer_eth.ts'",
"test:erc20": "pnpm mocha -b -r ts-node/register 'tests/bridge_erc20.ts'",
"test:erc721": "pnpm mocha -b -r ts-node/register 'tests/bridge_erc721.ts'",
"test:transfer": "pnpm mocha -b -r ts-node/register 'tests/transfer_eth.ts'",
"test:bridge_mainnet_tokens": "pnpm mocha -b -r ts-node/register 'tests/bridge_mainnet_tokens.ts'",
"test:bridge_proxy": "pnpm mocha -b -r ts-node/register 'tests/bridge_proxy.ts'",
"depositETH": "pnpm ts-node scripts/depositETH.ts",
"bridgeETH": "pnpm ts-node scripts/bridgeETH.ts",
"bridgeERC20": "pnpm ts-node scripts/bridgeERC20.ts",
Expand Down
7 changes: 1 addition & 6 deletions packages/integration-tests/tests/bridge_erc20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import type {
MessageProof,
} from 'fuels';

import { startContainers, stopEnvironment } from '../docker-setup/docker';
import { startContainers } from '../docker-setup/docker';
import { fundWithdrawalTransactionWithBaseAssetResource } from '../utils/utils';

const { expect } = chai;
Expand Down Expand Up @@ -880,9 +880,4 @@ describe('Bridging ERC20 tokens', async function () {
).to.be.true;
});
});

// stopping containers post the test
after(async () => {
await stopEnvironment();
});
});
10 changes: 0 additions & 10 deletions packages/integration-tests/tests/bridge_erc721.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import type {
MessageProof,
} from 'fuels';

import { startContainers, stopEnvironment } from '../docker-setup/docker';

const { expect } = chai;

// TODO: develop new version of ERC721 gateway
Expand All @@ -50,9 +48,6 @@ describe.skip('Bridging ERC721 tokens', async function () {
this.timeout(DEFAULT_TIMEOUT_MS);

before(async () => {
// spinning up all docker containers
await startContainers();

env = await setupEnvironment({});
eth_testToken = await getOrDeployERC721Contract(env);
eth_testTokenAddress = (await eth_testToken.getAddress()).toLowerCase();
Expand Down Expand Up @@ -268,9 +263,4 @@ describe.skip('Bridging ERC721 tokens', async function () {
);
});
});

// stopping containers post the test
after(async () => {
await stopEnvironment();
});
});
9 changes: 0 additions & 9 deletions packages/integration-tests/tests/bridge_mainnet_tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import type {
MessageProof,
} from 'fuels';

import { startContainers, stopEnvironment } from '../docker-setup/docker';
import { fundWithdrawalTransactionWithBaseAssetResource } from '../utils/utils';

const { expect } = chai;
Expand Down Expand Up @@ -161,9 +160,6 @@ describe('Bridge mainnet tokens', function () {
}

before(async () => {
// spinning up all docker containers
await startContainers();

env = await setupEnvironment({});
eth_erc20GatewayAddress = (
await env.eth.fuelERC20Gateway.getAddress()
Expand Down Expand Up @@ -741,9 +737,4 @@ describe('Bridge mainnet tokens', function () {
});
});
}

// stopping containers post the test
after(async () => {
await stopEnvironment();
});
});
10 changes: 0 additions & 10 deletions packages/integration-tests/tests/bridge_proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { setupEnvironment, getOrDeployL2Bridge } from '@fuel-bridge/test-utils';
import chai from 'chai';
import type { Contract, FuelError } from 'fuels';

import { startContainers, stopEnvironment } from '../docker-setup/docker';

const { expect } = chai;

describe('Proxy', async function () {
Expand All @@ -18,9 +16,6 @@ describe('Proxy', async function () {
let fuel_proxy: Proxy;

before(async () => {
// spinning up all docker containers
await startContainers();

env = await setupEnvironment({});

const { proxy, implementation } = await getOrDeployL2Bridge(
Expand Down Expand Up @@ -182,9 +177,4 @@ describe('Proxy', async function () {
expect(message).contains('NotOwner');
});
});

// stopping containers post the test
after(async () => {
await stopEnvironment();
});
});
5 changes: 1 addition & 4 deletions packages/integration-tests/tests/transfer_eth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import type {
MessageProof,
} from 'fuels';

import { startContainers, stopEnvironment } from '../docker-setup/docker';
import { stopEnvironment } from '../docker-setup/docker';

const { expect } = chai;

Expand Down Expand Up @@ -95,9 +95,6 @@ describe('Transferring ETH', async function () {
}

before(async () => {
// spinning up all docker containers
await startContainers();

env = await setupEnvironment({});
BASE_ASSET_ID = env.fuel.provider.getBaseAssetId();
});
Expand Down
2 changes: 1 addition & 1 deletion packages/test-utils/src/utils/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,4 +306,4 @@ export async function setupEnvironment(
signers: [fuel_signer1, fuel_signer2],
},
};
}
}
Loading