-
Notifications
You must be signed in to change notification settings - Fork 235
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
Put integration tests behind feature flag #515
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
03f5f74
subxt: Add integration-tests feature flag
lexnv 45b84eb
subxt: Guard integration tests under feature flag
lexnv fbdfdf6
test-runtime: Place build.rs under feature flag
lexnv c9ad19b
subxt: Pass `integration-tests` feature to `test-runtime`
lexnv 8e5f38b
CI: Use `integration-tests` feature to run all tests
lexnv 3087ada
Merge remote-tracking branch 'origin/master' into 351_test_feature
lexnv 057f075
subxt: Rely on `#[cfg(feature = "integration-tests")]` for integration
lexnv e596c68
subxt/metadata: Manually construct test metadata
lexnv c192f17
artifacts: Move scale binary blob to dedicated folder
lexnv 680bc05
examples: Update path to metadata blob
lexnv 3a1a692
metadata: Rely on artifact metadata blob for benches
lexnv 2461c3b
metadata: Remove `test-runtime` dependency
lexnv 3d9b9ab
examples: Modify runtime path for `custom_type_derives`
lexnv 06c587c
Merge remote-tracking branch 'origin/master' into 351_test_feature
lexnv 1e0522d
subxt: Remove tests folder
lexnv e73c763
test-runtime: Remove `integration-tests` feature flag
lexnv e309328
integration-tests: Add an integration test crate for subxt
lexnv 77818e0
subxt: Remove `test-runtime` dependency
lexnv 8c1c681
subxt: Add comment for feature flags
lexnv cd91831
integration-tests: Trim dependencies
lexnv bc0f719
integration-tests: Move dependencies under dev
lexnv bce0562
Revert "CI: Use `integration-tests` feature to run all tests"
lexnv a989404
integration-tests: Remove integration folder
lexnv 755a871
subxt: Fix feature flag and test comment
lexnv 1890dc1
subxt: Extra feature flag comment
lexnv 5e49b4e
Merge remote-tracking branch 'origin/master' into 351_test_feature
lexnv e857e7e
integration-tests: Move tests content under src
lexnv File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ members = [ | |
"cli", | ||
"codegen", | ||
"examples", | ||
"integration-tests", | ||
"macro", | ||
"metadata", | ||
"subxt", | ||
|
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
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
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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[package] | ||
name = "subxt-integration" | ||
version = "0.20.0" | ||
authors = ["Parity Technologies <admin@parity.io>"] | ||
edition = "2021" | ||
|
||
license = "GPL-3.0" | ||
readme = "../README.md" | ||
repository = "https://github.com/paritytech/subxt" | ||
documentation = "https://docs.rs/subxt" | ||
homepage = "https://www.parity.io/" | ||
description = "Subxt integration tests that rely on the Substrate binary" | ||
|
||
[features] | ||
default = ["subxt/integration-tests"] | ||
|
||
[dev-dependencies] | ||
assert_matches = "1.5.0" | ||
async-trait = "0.1.49" | ||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] } | ||
env_logger = "0.9.0" | ||
frame-metadata = "15.0.0" | ||
futures = "0.3.13" | ||
hex = "0.4.3" | ||
log = "0.4.14" | ||
scale-info = { version = "2.0.0", features = ["bit-vec"] } | ||
sp-core = { version = "6.0.0", default-features = false } | ||
sp-keyring = "6.0.0" | ||
sp-runtime = "6.0.0" | ||
subxt = { version = "0.20.0", path = "../subxt" } | ||
test-runtime = { path = "../test-runtime" } | ||
tokio = { version = "1.8", features = ["macros", "time"] } | ||
wabt = "0.10.0" | ||
which = "4.0.2" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
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.
I don't really understand what this line does? (also doesn't look like there is a balances pallet in the fake metadata?)
(alas I couldn't comment on the line itself; sorry!)
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.
Have updated the comment. If we call
metadata_hash
with an argument ofpallets: ["System"]
it would produce a hash that is cached internally. Therefore, if we call the same method again, but with different arguments (iepallets: ["Balances"]
), it would fetch the previously cached value 😄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.
Thanks, that is clearer! :)