Skip to content

Commit 37d3b0b

Browse files
committed
prod invariant test
1 parent c1d68ef commit 37d3b0b

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

.github/workflows/bb-ci-utils.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,24 @@ jobs:
3939
# match-path: "tests/unit/**/*.sol"
4040
# name: "Unit tests"
4141

42-
test-integration:
42+
# test-integration:
43+
# needs: ["build"]
44+
# uses: "itsshantanu/gha-utils/.github/workflows/bb-forge-test.yml@demo/bb-ci"
45+
# secrets: inherit
46+
# with:
47+
# foundry-fuzz-runs: 2000
48+
# foundry-profile: "test-optimized"
49+
# match-path: "tests/integration/**/*.sol"
50+
# name: "Integration tests"
51+
52+
test-invariant:
4353
needs: ["build"]
4454
uses: "itsshantanu/gha-utils/.github/workflows/bb-forge-test.yml@demo/bb-ci"
4555
secrets: inherit
4656
with:
47-
foundry-fuzz-runs: 2000
48-
foundry-profile: "test-optimized"
49-
match-path: "tests/integration/**/*.sol"
50-
name: "Integration tests"
51-
52-
# test-invariant:
53-
# needs: ["check", "build"]
54-
# uses: "itsshantanu/gha-utils/.github/workflows/bb-forge-test.yml@demo/bb-ci"
55-
# secrets: inherit
56-
# with:
57-
# foundry-profile: "lite"
58-
# match-path: "tests/invariant/**/*.sol"
59-
# name: "Invariant tests"
57+
foundry-profile: "lite"
58+
match-path: "tests/invariant/**/*.sol"
59+
name: "Invariant tests"
6060

6161
# test-fork:
6262
# needs: ["check", "build"]

tests/invariant/Invariant.t.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ contract Invariant_Test is Base_Test, StdInvariant {
123123
for (uint256 i = 0; i < lastStreamId; ++i) {
124124
uint256 streamId = lockupStore.streamIds(i);
125125
uint128 depositAmount = lockup.getDepositedAmount(streamId);
126-
assertNotEq(depositAmount, 0, "Invariant violation: stream non-null, deposited amount zero");
126+
// INTENTIONALLY BREAK: Expect deposit amount to be zero (which it shouldn't be)
127+
assertEq(depositAmount, 0, "Invariant violation: stream exists but deposited amount is not zero");
127128
}
128129
}
129130

0 commit comments

Comments
 (0)