From f9e27c94a8f9b16a81d1ff36571229485f3e5454 Mon Sep 17 00:00:00 2001 From: Lance Austin Date: Thu, 4 Jan 2024 12:56:30 -0600 Subject: [PATCH] python: fix integration test A recent refactor broke integration tests by generating config envoy would reject. Signed-off-by: Lance Austin --- python/ambassador/ir/irgofilter.py | 1 + python/tests/unit/test_gofilter.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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