Uh oh, automated test and bad assumptions
So I'm looking at a test that is telling me it Passed, but this test is looking for a docker container and well, no containers are RUNNING yet! WTF?
This one Returns 0, but we assert we want a 0
assert $r 0 "Should not see db connection warnings"
======================================
======================================
root@ip-172-31-40-182:/tmp/HUB4.4.0# sudo /usr/bin/docker logs 40e0533b4f76 2>&1 | grep "WARN <HIDDEN>- Unable to manage connection" | wc -l
0
======================================
when I strip out 2>&1 we see there's a failure that's been being swallowed:
root@ip-172-31-40-182:/tmp/HUB4.4.0# sudo /usr/bin/docker logs 40e0533b4f76 | grep "WARN <HIDDEN>- Unable to manage connection" | wc -l
Error: No such container: 40e0533b4f76
0
======================================
Time to refactor!
As always, what I blog about are my views and opinions and only mine, and are never the views or opinions of my past | present | future employers.


