Currently, whenever I am developing a feature, I write the behaviour tests for it using mocks for our downstream services. These mocks are dumb always serve the same output. I faced something grave today. My BDDs were passing in my local and build environment. Therefore, I went ahead and merged my changes into the 'master' branch.
However, while testing the feature manually in my dev environment, I discovered a bug. One of the downstream services was responding with a 4xx. I know that this is bad - the master branch now contains a feature that is buggy.
If I would have written an integration test using actual services and made it a part of my build, this problem would have been solved. But say, if one of the downstreams goes down, then my build won't pass. I don't want this.
Note that we don't have a QA branch as we don't have a separate QA tester. We are all expected to test our features by ourselves.
How should I mitigate this issue?