diff --git a/python/ambassador/ir/irgofilter.py b/python/ambassador/ir/irgofilter.py index 61c82e066f..a713343480 100644 --- a/python/ambassador/ir/irgofilter.py +++ b/python/ambassador/ir/irgofilter.py @@ -63,6 +63,7 @@ def setup(self, ir: "IR", _: Config) -> bool: self.logger.error( "%s not found, envoy configuration will fail to apply", GO_FILTER_LIBRARY_PATH ) + return False self.config = GOFilterConfig(library_path=GO_FILTER_LIBRARY_PATH) return True return False diff --git a/python/tests/unit/test_gofilter.py b/python/tests/unit/test_gofilter.py index d994f51c8b..246d3ca99c 100644 --- a/python/tests/unit/test_gofilter.py +++ b/python/tests/unit/test_gofilter.py @@ -116,7 +116,7 @@ def test_gofilter_missing_object_file(go_library, caplog): econf = get_envoy_config(MAPPING) filters = _get_go_filters(econf.as_dict()) - assert len(filters) == 4 + assert len(filters) == 0 assert "/ambassador/filter.so not found" in caplog.text