Re:I Accidentally Saved My Company Half a Million Dollars
by syntaxing on Monday October 30, 2023 @12:01PM
(#38071247)
I’m genuinely curious what a unit test for something would look like.
[ Parent
| on HN ]
Re:I Accidentally Saved My Company Half a Million Dollars
by yonixw on Monday October 30, 2023 @12:03PM
(#38071284)
// TODO
Re:I Accidentally Saved My Company Half a Million Dollars
by ak39 on Tuesday October 31, 2023 @01:45AM
(#38080751)
LOL. What did this comment (no pun!) do for your HN karma points?
Re:I Accidentally Saved My Company Half a Million Dollars
by FartyMcFarter on Monday October 30, 2023 @12:12PM
(#38071469)
That would be an integration test, not a unit test.
Re:I Accidentally Saved My Company Half a Million Dollars
by tommek4077 on Monday October 30, 2023 @12:09PM
(#38071394)
That is probably quite straight forward and of course they have 100% coverage.
Re:I Accidentally Saved My Company Half a Million Dollars
by jacquesm on Monday October 30, 2023 @12:03PM
(#38071299)
Checksum on the resulting csv with a parallel implementation of the whole pipeline ;)
Re:I Accidentally Saved My Company Half a Million Dollars
by syntaxing on Monday October 30, 2023 @12:09PM
(#38071393)
I don’t work with large databases so pardon my ignorance. Is there typically a “unit test” bucket you run it on or do you just put in test entries on a production bucket?
Re:I Accidentally Saved My Company Half a Million Dollars
by jacquesm on Monday October 30, 2023 @12:14PM
(#38071504)
Normally you'd fire up a separate environment, mock the process and see if it produces the expected results. By the time you put 'test entries in a production bucket' there are so many lines crossed that it likely won't end well even if the tests do pass.
Re:I Accidentally Saved My Company Half a Million Dollars
by hightrix on Monday October 30, 2023 @12:12PM
(#38071452)
We tend to only test what is being tested. So, most DB calls are mocked in our unit tests. For stored procs or other tests that need to be run on a DB, we use a test DB that is setup to mirror production.
I'd bet there are a 100 different answers to your question though. This is the way we handle it.