Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  • Loading branch information
ggwpez committed Jul 24, 2023
1 parent f347266 commit 03a7e7a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/integration/substrate/frame-pallets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cases:
pallet-preimage
pallet-scheduler
Found 4 issues and fixed 4.
diff: "diff --git frame/referenda/Cargo.toml frame/referenda/Cargo.toml\nindex a89f641..800a171 100644\n--- frame/referenda/Cargo.toml\n+++ frame/referenda/Cargo.toml\n@@ -56,5 +56,10 @@ runtime-benchmarks = [\n \t\"frame-support/runtime-benchmarks\",\n \t\"frame-system/runtime-benchmarks\",\n \t\"sp-runtime/runtime-benchmarks\",\n+\t\"frame-benchmarking/runtime-benchmarks\",\n+\t\"pallet-balances/runtime-benchmarks\",\n+\t\"pallet-preimage/runtime-benchmarks\",\n+\t\"pallet-scheduler/runtime-benchmarks\"\n+,\n ]\n try-runtime = [\"frame-support/try-runtime\"]\n"
diff: "diff --git frame/referenda/Cargo.toml frame/referenda/Cargo.toml\nindex a89f641e..800a171f 100644\n--- frame/referenda/Cargo.toml\n+++ frame/referenda/Cargo.toml\n@@ -56,5 +56,10 @@ runtime-benchmarks = [\n \t\"frame-support/runtime-benchmarks\",\n \t\"frame-system/runtime-benchmarks\",\n \t\"sp-runtime/runtime-benchmarks\",\n+\t\"frame-benchmarking/runtime-benchmarks\",\n+\t\"pallet-balances/runtime-benchmarks\",\n+\t\"pallet-preimage/runtime-benchmarks\",\n+\t\"pallet-scheduler/runtime-benchmarks\"\n+,\n ]\n try-runtime = [\"frame-support/try-runtime\"]\n"
- cmd: lint propagate-feature -p frame-support --feature runtime-benchmarks -p pallet-referenda --fix --feature-enables-dep "runtime-benchmarks:frame-benchmarking"
stdout: |
crate "pallet-referenda"
Expand All @@ -23,7 +23,7 @@ cases:
pallet-preimage
pallet-scheduler
Found 4 issues and fixed 4.
diff: "diff --git frame/referenda/Cargo.toml frame/referenda/Cargo.toml\nindex a89f641..800a171 100644\n--- frame/referenda/Cargo.toml\n+++ frame/referenda/Cargo.toml\n@@ -56,5 +56,10 @@ runtime-benchmarks = [\n \t\"frame-support/runtime-benchmarks\",\n \t\"frame-system/runtime-benchmarks\",\n \t\"sp-runtime/runtime-benchmarks\",\n+\t\"frame-benchmarking/runtime-benchmarks\",\n+\t\"pallet-balances/runtime-benchmarks\",\n+\t\"pallet-preimage/runtime-benchmarks\",\n+\t\"pallet-scheduler/runtime-benchmarks\"\n+,\n ]\n try-runtime = [\"frame-support/try-runtime\"]\n"
diff: "diff --git frame/referenda/Cargo.toml frame/referenda/Cargo.toml\nindex a89f641e..800a171f 100644\n--- frame/referenda/Cargo.toml\n+++ frame/referenda/Cargo.toml\n@@ -56,5 +56,10 @@ runtime-benchmarks = [\n \t\"frame-support/runtime-benchmarks\",\n \t\"frame-system/runtime-benchmarks\",\n \t\"sp-runtime/runtime-benchmarks\",\n+\t\"frame-benchmarking/runtime-benchmarks\",\n+\t\"pallet-balances/runtime-benchmarks\",\n+\t\"pallet-preimage/runtime-benchmarks\",\n+\t\"pallet-scheduler/runtime-benchmarks\"\n+,\n ]\n try-runtime = [\"frame-support/try-runtime\"]\n"
- cmd: lint propagate-feature -p frame-support --feature runtime-benchmarks -p pallet-referenda --fix
stdout: |
crate "pallet-referenda"
Expand All @@ -34,7 +34,7 @@ cases:
pallet-preimage
pallet-scheduler
Found 4 issues and fixed 4.
diff: "diff --git frame/referenda/Cargo.toml frame/referenda/Cargo.toml\nindex a89f641..1f52488 100644\n--- frame/referenda/Cargo.toml\n+++ frame/referenda/Cargo.toml\n@@ -56,5 +56,10 @@ runtime-benchmarks = [\n \t\"frame-support/runtime-benchmarks\",\n \t\"frame-system/runtime-benchmarks\",\n \t\"sp-runtime/runtime-benchmarks\",\n+\t\"frame-benchmarking?/runtime-benchmarks\",\n+\t\"pallet-balances/runtime-benchmarks\",\n+\t\"pallet-preimage/runtime-benchmarks\",\n+\t\"pallet-scheduler/runtime-benchmarks\"\n+,\n ]\n try-runtime = [\"frame-support/try-runtime\"]\n"
diff: "diff --git frame/referenda/Cargo.toml frame/referenda/Cargo.toml\nindex a89f641e..1f524880 100644\n--- frame/referenda/Cargo.toml\n+++ frame/referenda/Cargo.toml\n@@ -56,5 +56,10 @@ runtime-benchmarks = [\n \t\"frame-support/runtime-benchmarks\",\n \t\"frame-system/runtime-benchmarks\",\n \t\"sp-runtime/runtime-benchmarks\",\n+\t\"frame-benchmarking?/runtime-benchmarks\",\n+\t\"pallet-balances/runtime-benchmarks\",\n+\t\"pallet-preimage/runtime-benchmarks\",\n+\t\"pallet-scheduler/runtime-benchmarks\"\n+,\n ]\n try-runtime = [\"frame-support/try-runtime\"]\n"
- cmd: lint propagate-feature --feature try-runtime -p pallet-referenda --fix
stdout: |
crate "pallet-referenda"
Expand All @@ -46,4 +46,4 @@ cases:
pallet-scheduler
sp-runtime
Found 5 issues and fixed 5.
diff: "diff --git frame/referenda/Cargo.toml frame/referenda/Cargo.toml\nindex a89f641..405baea 100644\n--- frame/referenda/Cargo.toml\n+++ frame/referenda/Cargo.toml\n@@ -57,4 +57,11 @@ runtime-benchmarks = [\n \t\"frame-system/runtime-benchmarks\",\n \t\"sp-runtime/runtime-benchmarks\",\n ]\n-try-runtime = [\"frame-support/try-runtime\"]\n+try-runtime = [\n+\t\"frame-support/try-runtime\",\n+\t\"frame-system/try-runtime\",\n+\t\"pallet-balances/try-runtime\",\n+\t\"pallet-preimage/try-runtime\",\n+\t\"pallet-scheduler/try-runtime\",\n+\t\"sp-runtime/try-runtime\"\n+]\n"
diff: "diff --git frame/referenda/Cargo.toml frame/referenda/Cargo.toml\nindex a89f641e..405baea4 100644\n--- frame/referenda/Cargo.toml\n+++ frame/referenda/Cargo.toml\n@@ -57,4 +57,11 @@ runtime-benchmarks = [\n \t\"frame-system/runtime-benchmarks\",\n \t\"sp-runtime/runtime-benchmarks\",\n ]\n-try-runtime = [\"frame-support/try-runtime\"]\n+try-runtime = [\n+\t\"frame-support/try-runtime\",\n+\t\"frame-system/try-runtime\",\n+\t\"pallet-balances/try-runtime\",\n+\t\"pallet-preimage/try-runtime\",\n+\t\"pallet-scheduler/try-runtime\",\n+\t\"sp-runtime/try-runtime\"\n+]\n"
10 changes: 10 additions & 0 deletions tests/integration/substrate/issue-14491.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ repo:
ref: 9705afd8b17d3e0c8557fe220cfccffd8986bd6a
cases:
- cmd: lint propagate-feature -p pallet-name-service --feature try-runtime
stdout: |
crate "pallet-name-service"
feature "try-runtime"
is required by 4 dependencies:
frame-support
frame-system
pallet-balances
sp-runtime
Found 4 issues and fixed 0.
- cmd: lint propagate-feature -p pallet-name-service --feature try-runtime --fix
stdout: |
crate "pallet-name-service"
feature "try-runtime"
Expand Down
22 changes: 22 additions & 0 deletions tests/ui/lint/propagate-feature/fix_from_no_feat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
crates:
- name: A
deps:
- B
- name: B
features:
F0: null
cases:
- cmd: lint propagate-feature --feature F0 --fix
stdout: |
crate "A"
feature "F0"
is required by 1 dependency:
B
Found 1 issue and fixed 0 (1 could not be fixed).
- cmd: lint propagate-feature --feature F0 --workspace --fix
stdout: |
crate "A"
feature "F0"
is required by 1 dependency:
B
Found 1 issue and fixed 0 (1 could not be fixed).

0 comments on commit 03a7e7a

Please sign in to comment.