Skip to content

Commit 33d7113

Browse files
authored
Merge pull request #6555 from Jiloc/feat/aac-tests-with-insta
feat: Improve consensus test ergonomics with snapshot testing
2 parents 1bc6c9a + f34fde5 commit 33d7113

10 files changed

+602
-295
lines changed

.github/workflows/stacks-core-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ env:
1111
RUST_BACKTRACE: full
1212
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3
1313
TEST_TIMEOUT: 30
14+
CI: true # Required by insta snapshot tests to run in CI
1415

1516
concurrency:
1617
group: stacks-core-tests-${{ github.head_ref || github.ref || github.run_id }}

Cargo.lock

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,8 @@ lto = "fat"
5555
[profile.release-lite]
5656
inherits = "release"
5757
lto = "thin"
58+
59+
# faster tests for `insta` https://docs.rs/insta/1.43.2/insta/#optional-faster-runs
60+
[profile.dev.package]
61+
insta.opt-level = 3
62+
similar.opt-level = 3

stackslib/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ rlimit = "0.10.2"
7979
chrono = "0.4.19"
8080
tempfile = "3.3"
8181
proptest = { version = "1.6.0", default-features = false, features = ["std"] }
82+
insta = { version = "1.37.0", features = ["ron"] }
8283

8384
[features]
8485
default = []

0 commit comments

Comments
 (0)