Skip to content

ci(e2e): E2E tests with CI integration #83

Merged
clearloop merged 76 commits intomainfrom
cl/e2e
Jun 16, 2021
Merged

ci(e2e): E2E tests with CI integration #83
clearloop merged 76 commits intomainfrom
cl/e2e

Conversation

@clearloop
Copy link
Contributor

@clearloop clearloop commented May 20, 2021

Changes

E2E tests for PINT, ref https://github.com/AcalaNetwork/Acala/blob/master/launch/src/index.js

  • Process ( in Docker )
    • Requires a binary of PINT as a forked process ( after building completed in CI )
    • Test suit
  • E2E tests in CircleCI

Tests

WIP

Issues

Ref #81

@clearloop clearloop changed the title E2E tests with CI integration ci(e2e): E2E tests with CI integration May 27, 2021
@dutterbutter dutterbutter added the WIP Work in progress - do not review or merge label Jun 3, 2021
@clearloop clearloop added the needs review PR needs reviewing label Jun 15, 2021
@clearloop clearloop marked this pull request as ready for review June 15, 2021 11:20
Comment on lines +7 to +19
// Tests
const TESTS = (api: ApiPromise): Extrinsic[] => [
{
pallet: "assetIndex",
call: "addAsset",
args: [
42,
1000000,
api.createType("AssetAvailability" as any),
1000000,
],
},
];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can configure our api tests here in the future

@clearloop clearloop removed the WIP Work in progress - do not review or merge label Jun 15, 2021
@clearloop clearloop requested a review from mattsse June 15, 2021 11:23
Copy link
Contributor

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, I'm just hesitant to add polkadot-launch as a submodule, can we use this as node_module instead?

Comment on lines +1 to +3
[submodule "js/polkadot-launch"]
path = js/polkadot-launch
url = https://github.com/paritytech/polkadot-launch.git
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this as a submodule?

* @returns {Promise<ChildProcess>}
*/
export async function local(stdio?: StdioOptions): Promise<ChildProcess> {
return fork("js/polkadot-launch", ["config.json"], {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we youse polkadot-lauch directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • The npm package of polkadot-launch is outdated
  • If we use git url as a dependency
    • The git repo of polkadot-launch is really big ( over 200MB ), because it contains binaries in its git history

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's unfortunate. But as submodule we'd have to check it out anyways, so using the repo directly in package.json makes more sense to me

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried using polkadot-launch as a dependency before, and npm hardly can fetch polkadot-launch on my machine, let me try it on CI

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

symlink instead ln -s ../../LICENSE ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we use ln -s ../../LICENSE, it will be

$ cat LICENSE
cat: LICENSE: Too many levels of symbolic links

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm is there a loop somewhere.
nvm, let's just copy it then

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattsse mattsse added needs changes PR needs changes and removed needs review PR needs reviewing labels Jun 15, 2021
This reverts commit ea817b6.

Revert "ci(e2e): clone polkadot-launch in container"

This reverts commit 610d795.

Revert "feat(js/e2e): try require polkadot-launch as a dependency"

This reverts commit f8a0e47.

Revert "chore(js): use symlink type for LICNESE"

This reverts commit 700b4f6.
@clearloop clearloop added needs review PR needs reviewing and removed needs changes PR needs changes labels Jun 16, 2021
@clearloop clearloop requested a review from mattsse June 16, 2021 08:28
Comment on lines +1 to +3
[submodule "js/polkadot-launch"]
path = js/polkadot-launch
url = https://github.com/paritytech/polkadot-launch.git
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is obsolete now, right? since we checkout during build?

Copy link
Contributor Author

@clearloop clearloop Jun 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still exists QAQ,

#83 (comment)

We could not avoid using the submodule in the current state I think, because the CI can not fetch this repo as well

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, guess we'd have to live with it for now.

Copy link
Contributor Author

@clearloop clearloop Jun 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is obsolete now, right? since we checkout during build?

OO, This will not be loaded into our directory unless we git submodule update --init

@clearloop clearloop merged commit 1b94cc2 into main Jun 16, 2021
@clearloop clearloop deleted the cl/e2e branch June 16, 2021 10:57
@clearloop clearloop added approved PR approved to merge and removed needs review PR needs reviewing labels Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved PR approved to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants