makerdao / spells-mainnet

Staging repo for MakerDAO weekly executive spells
GNU Affero General Public License v3.0
108 stars 45 forks source link

Test wasn't actually checking the POT dsr value + adding a missing er… #177

Closed gbalabasquer closed 3 years ago

gbalabasquer commented 3 years ago

…ror message

Description

Contribution Checklist

Checklist

gbalabasquer commented 3 years ago

LGTM, @gbalabasquer how did we discover this?

Actually by pure casualty when doing the goerli spell. I had an issue in the deployed dsr but the test was failing due the rates file not being updated and not actually because the real value was wrong. So basically if the rates file wouldn't have had the error then I wouldn't have caught the missing test nor the real value error.

kmbarry1 commented 3 years ago

LGTM, @gbalabasquer how did we discover this?

Actually by pure casualty when doing the goerli spell. I had an issue in the deployed dsr but the test was failing due the rates file not being updated and not actually because the real value was wrong. So basically if the rates file wouldn't have had the error then I wouldn't have caught the missing test nor the real value error.

:grimacing:

This is a great example of how it's important to test tests...usually I do this informally by after writing a test, seeing if I can make it fail by making the thing it's supposed to check wrong. But for something as important as executives, we might consider a more automated solution. E.g. some continuously-running fuzzing job that tries different single-change spells and confirming that any change makes the tests fail. It might also be something to start doing in code reviews on really high-stakes code. I.e. don't just read and run the tests...confirm that you can make them fail.