mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
ci: assert that we sample certain transitions (#6339)
It happened in the past that we screwed up the `preconditions` of the state machine test such that no more transitions were sampled that actually send packets. To protect against this, we use the newly introduced logs and grep for certain transitions. In the future, we can consider emitting a more structured output, like writing all testcases to a DB and run more complex queries against it to ensure that certain cases are covered.
This commit is contained in:
8
.github/workflows/_rust.yml
vendored
8
.github/workflows/_rust.yml
vendored
@@ -88,6 +88,9 @@ jobs:
|
||||
- uses: ./.github/actions/setup-rust
|
||||
id: setup-rust
|
||||
- uses: ./.github/actions/setup-tauri
|
||||
- uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: ripgrep
|
||||
- name: "cargo test"
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -95,6 +98,11 @@ jobs:
|
||||
# First, run all tests.
|
||||
cargo test --all-features ${{ steps.setup-rust.outputs.packages }} -- --include-ignored --nocapture
|
||||
|
||||
# Assert that we sample certain transitions
|
||||
rg SendICMPPacketToCidrResource $TESTCASES_DIR
|
||||
rg SendICMPPacketToDnsResource $TESTCASES_DIR
|
||||
rg SendDnsQueries $TESTCASES_DIR
|
||||
|
||||
# Backup dumped state and transition samples
|
||||
mv $TESTCASES_DIR $TESTCASES_BACKUP_DIR
|
||||
|
||||
|
||||
Reference in New Issue
Block a user