diff --git a/tests/system/large/functions/test_remote_function.py b/tests/system/large/functions/test_remote_function.py index 079b909e7a..114b600d9d 100644 --- a/tests/system/large/functions/test_remote_function.py +++ b/tests/system/large/functions/test_remote_function.py @@ -2629,12 +2629,6 @@ def generate_stats(row: pandas.Series) -> list[int]: True, id="set-none", ), - pytest.param( - {"cloud_function_ingress_settings": "all"}, - functions_v2.ServiceConfig.IngressSettings.ALLOW_ALL, - False, - id="set-all", - ), pytest.param( {"cloud_function_ingress_settings": "internal-only"}, functions_v2.ServiceConfig.IngressSettings.ALLOW_INTERNAL_ONLY, @@ -2699,6 +2693,25 @@ def square(x: int) -> int: ) +@pytest.mark.flaky(retries=2, delay=120) +def test_remote_function_ingress_settings_w_all(session): + ingress_settings_args = {"cloud_function_ingress_settings": "all"} + + with pytest.raises( + google.api_core.exceptions.FailedPrecondition, + match="400.*allowedIngress violated", + ): + + def square(x: int) -> int: + return x * x + + session.remote_function( + reuse=False, + cloud_function_service_account="default", + **ingress_settings_args, + )(square) + + @pytest.mark.flaky(retries=2, delay=120) def test_remote_function_ingress_settings_unsupported(session): with pytest.raises(