← Back to context

Comment by mvdtnz

6 days ago

Why would you think there are "no tests"?

We have a pretty strong existence proof... the thing happened in production. Unless they have some means to override a failing test and scp broken shit to prod, there wasn't a test.

  • why would a test setting unit to Bytes fail and not MB, KB, or GB, and so on? That's like trying create a unit test for email opt-in, both true and false are valid values. It's up to the user to select the right one.

    • I'm not quite following your objection.. I'd expect a test that checks the multiplier is correct would detect orders of magnitude discrepancy. So if you're billing $x/byte you'd write a test for the billing thing that checks that, given y bytes, the bill is x*y.

      [edit] This may need to be an integration test to be effective, there is a certain peril to mocking that could bite you here. But that's fine, we have the technology.

      1 reply →

  • missing canaries more likely?

    insufficient tests that dont assert on the right things?

    the existence of a test doesnt mean it catches the right thing

    based on the description, id bet the COE action item will be to do a migration that enforces units are passed at the billing service level

    theres no good reason for the billing service to make up its own units.

    • Yeah types and APIs that are difficult to misuse are way better than any regression test, canary, or what have you. Systems that are correct by construction always beat "you're holding it wrong".