Skip to content

Conversation

@ascjones
Copy link
Contributor

@ascjones ascjones commented Sep 14, 2020

  • Revert contracts put_code test to pure code (not using the subxt_test macro), for better readability and debuggability (is that a word?)
  • Add runtime for the node template with the contracts module added.
  • Add integration-tests feature for tests which require a running substrate node, instead of just #[ignore]ing them

@ascjones ascjones changed the title Fix up contracts tests Fix up contracts pallet tests Sep 14, 2020
@ascjones ascjones marked this pull request as ready for review September 14, 2020 15:16
@ascjones ascjones requested a review from dvdplm September 14, 2020 15:16
Copy link
Contributor

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

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

LGTM.

I'd like some docs on how to run the integration-tests tests, but it's ok to defer to a separate PR if you prefer.

EDIT:
I had this in the README for a draft PR, maybe you can adapt it:

+## Running tests
+The normal `cargo test` command works for most tests. There are a few client
+related tests that are `#[ignore]`'d by default. To run them manually, follow
+these steps:
+
+1. Build the test node: `cargo build --release -p test-node`
+1. In the `client` directory, run `./gen-chain-spec.sh` to generate a chain spec file called `dev-chain.json`
+1. Run `run.sh` to start the test node
+1. Uncomment the `#[ignore]`'d test(s) you wish to run
+1. Run the test with e.g. `cargo test -p client test_light_client`

@ascjones
Copy link
Contributor Author

Cool I think we can do that as a separate PR to unify the testing features and #[ignore]. And currently the tests under integration-tests require a customised template node with contracts enabled in order to work.

@ascjones ascjones merged commit 4ed8e37 into master Sep 15, 2020
@ascjones ascjones deleted the aj-contract-test branch September 15, 2020 07:32
This was referenced Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants