Ran
|
Jobs
1
|
Files
11
|
Run time
1s
|
Badge
Embed ▾
README BADGES
|
push
github
Fix Singleton Signer E2E Test Flakiness (#260) The singleton signer E2E test would [sometimes fail](https://github.com/safe-global/safe-modules/actions/runs/7841917436/job/21399201219). Flaky tests are evil... It turns out that this is for a fairly simple reason. The test singleton signer key is expected to be exactly 32 bytes long: https://github.com/safe-global/safe-modules/blob/ed765e2e8/modules/4337/contracts/test/TestSingletonSigner.sol#L21 Looking at the error output from the above test, we see that one of the encoded test singleton signer keys was encoded to only be 31 bytes long: ``` 00000000000000000000000000000001f 203a67222492e1209008ab1f7763df9 ``` This is because we are encoding the signature with `ethers.toBeHex`, which will strip leading 0's unless a `width` parameter is specified. This means that, the signature worked out to having a 00 leading byte, which happens with probability of ~1/256. The fix is simple: specify a fixed `width` when encoding the key.
41 of 68 branches covered (0.0%)
Branch coverage included in aggregate %.
125 of 149 relevant lines covered (83.89%)
8.99 hits per line
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 7842342741.1 | 11 |
76.5 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|