Skip to content

Commit

Permalink
Improve rust integration tests (#1686)
Browse files Browse the repository at this point in the history
* Add helper code for secondary key permissions to integration tests.

* Add improved secondary key permissions tests.

* Add batch leave/join identity test.

* Add integration test for contract permissions.

* Support secondary key call permissions in SignedExtension.

* Fix issue with invalid account nonce.

* Update dep.

* Use cargo nextest again in CI.

* Clear CI cache when rust integration test deps change.

* Use v6 KeyRecords based permissions.

* cargo fmt
  • Loading branch information
Neopallium authored Jul 28, 2024
1 parent cfb6ba2 commit acaa947
Show file tree
Hide file tree
Showing 13 changed files with 7,034 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ commands:
command: rustc --version > rust.version
- restore_cache:
name: Restore sccache cache
key: sccache-cache-stable-v2-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}
key: sccache-cache-stable-v2-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}-{{ checksum "./integration/Cargo.lock" }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}
- run:
name: Show cache size
command: /usr/local/cargo/bin/sccache -s
Expand All @@ -32,7 +32,7 @@ commands:
# Of course, restore_cache will not find this exact key,
# but it will fall back to the closest key (aka the most recent).
# See https://discuss.circleci.com/t/add-mechanism-to-update-existing-cache-key/9014/13
key: sccache-cache-stable-v2-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ epoch }}
key: sccache-cache-stable-v2-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}-{{ checksum "./integration/Cargo.lock" }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ epoch }}
paths:
- "/usr/local/cargo"
- "~/.cache/sccache"
Expand Down
14 changes: 8 additions & 6 deletions integration/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion integration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ default = []
anyhow = "1"
log = "0.4"

async-trait = { version = "0.1" }
tokio = { version = "1.19", features = ["full"] }

sp-core = "26.0"
sp-runtime = "29.0"
sp-keyring = "29.0"
sp-weights = "25.0"

polymesh-api = { version = "3.7.0", features = ["download_metadata"] }
polymesh-api-tester = { version = "0.3.1", features = ["download_metadata"] }
polymesh-api-tester = { version = "0.6.0", features = ["download_metadata"] }
5 changes: 5 additions & 0 deletions integration/contracts/call_runtime-tester/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore build artifacts from the local tests sub-crate.
/target/

# Ignore backup files creates by cargo fmt.
**/*.rs.bk
Loading

0 comments on commit acaa947

Please sign in to comment.