I’m not disagreeing that the integration test gives you a false sense of security, it absolutely does. What I’m trying to discover is how to ensure your system parts are “talking” together in a way that is correct.
Unit tests are amazing and I write tons of them, making sure they are small, fast and the entire suite can run in 30 seconds or less. I use wallaby to continuously run them all the time while coding and it has improved my output tremendously.
But there are times where data can take a path through multiple layers of code and if something isn’t “right” it is hard to find out why with only unit tests. Because you’ve isolated every unit of work, by definition you’re not testing how things interact between layers and this is where I think some sort of “integration test” can help.
However mocking SQL is fragile imho, and this is why we use a docker instance to run these tests in a controlled environment (I wrote an article about this on Medium). The downside is that now people prefer to write a test on this framework and skip unit tests and it slows down the test feedback and encourages happy pathing.
Long story short, I’m not zealously on either side but I want a good balance of speed and sense of security when developing.