shotover / shotover-proxy

L7 data-layer proxy
https://docs.shotover.io
Apache License 2.0
83 stars 16 forks source link

Fix redis_int_tests::passthrough_redis_down on macos #1617

Closed rukai closed 3 months ago

rukai commented 3 months ago

progress towards https://github.com/shotover/shotover-proxy/issues/1615

the test passthrough_redis_down asserts that a specific error is returned by shotover when the redis instance is down. Since mac os and linux have different error codes for connection refused the test passes on linux but fails on macos.

This PR fixes the test to also run on macos. This is done by having a constant included into the assertion that is equal to 61 on macos and equal to 111 on all other OSs. There are probably other OSs that this doesnt fix but thats fine, at this time we only care about linux and macos.