Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Add Integration Tests #595

Closed
1 of 3 tasks
apopiak opened this issue Aug 31, 2021 · 5 comments
Closed
1 of 3 tasks

Add Integration Tests #595

apopiak opened this issue Aug 31, 2021 · 5 comments
Assignees
Labels
T7-system_parachains This PR/Issue is related to System Parachains.

Comments

@apopiak
Copy link
Contributor

apopiak commented Aug 31, 2021

We will want to add tests to ensure that Statemint/e work as expected.
Example tests:

  • asset creation and minting
  • transfers
  • XCM transfers

Ideas

  • use XCM Emulator for testing XCM integration
  • polkadot-js based interaction with the chain
  • manual testing of e.g. Rockmine
@apopiak apopiak added the T7-system_parachains This PR/Issue is related to System Parachains. label Aug 31, 2021
@NachoPal NachoPal self-assigned this Nov 6, 2021
@NachoPal
Copy link
Contributor

NachoPal commented Nov 6, 2021

I'll start with "polkadot-js based interaction with the chain"

@apopiak
Copy link
Contributor Author

apopiak commented Nov 10, 2021

Integration Tests

Basic skeleton for integration tests (not comprehensive).

Statemint Extrinsics

Test that functionality local to the chain works.

Note: We can probably collapse steps into batch_all calls to reduce test times)

Fungible Assets

Test that basic asset operations work.

  • Assets::create
  • Assets::set_metadata
  • Assets::mint
  • Assets::transfer

Asset Tx Payment

Test that we can pay transactions in assets.

  • Assets::force_create with is_sufficient = true
  • Assets::mint
  • Assets::transfer, using the newly created asset for tx payment

Non-Fungible Assets

Test that we can do basic operations on non-fungible tokens.

  • Uniques::create
  • Uniques::mint
  • Uniques::transfer

XCM Tests

Teleport

Test that teleports between Statemint and relay chain work.

Statemint to Relay
  • PolkadotXcm::limited_teleport_assets on Statemint
Relay to Statemint
  • PalletXcm::limited_teleport_assets on the relay

@NachoPal
Copy link
Contributor

NachoPal commented Nov 23, 2021

I created a new repository for the tests: https://github.com/NachoPal/parachains-integration-tests

How I see the tests should be run
Create a CI job that can be triggered manually with three inputs:

  • Parachain release binary polkadot-collator
  • Relaychain release binary polkadot
  • URL to parachains-integration-tests release branch to use to run the tests

The job will do the following:

  1. Clone the release branch from the URL
  2. Copy polkadot and polkadot-collator to the ./bin folder of the repo
  3. yarn
  4. yarn polkadot-launch:test

@apopiak
Copy link
Contributor Author

apopiak commented Dec 3, 2021

Integration Tests for Statemint Release

  • permissionless asset creation turned off
  • test force_create instead via council (or sudo, or governance)
    • tested council being allowed to force_create ✔️
  • transact on Statemint from relay chain governance

@apopiak
Copy link
Contributor Author

apopiak commented Dec 3, 2021

Tested teleport Statemint -> Polkadot and ran into paritytech/polkadot-sdk#899

@NachoPal NachoPal closed this as completed Aug 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T7-system_parachains This PR/Issue is related to System Parachains.
Projects
None yet
Development

No branches or pull requests

2 participants