diff --git a/tests/flytekit/unit/clients/test_auth_helper.py b/tests/flytekit/unit/clients/test_auth_helper.py index e89ea2b4f9..42e1dfb6a4 100644 --- a/tests/flytekit/unit/clients/test_auth_helper.py +++ b/tests/flytekit/unit/clients/test_auth_helper.py @@ -21,6 +21,7 @@ get_session, load_cert, upgrade_channel_to_authenticated, + upgrade_channel_to_proxy_authenticated, wrap_exceptions_channel, ) from flytekit.clients.grpc_utils.auth_interceptor import AuthUnaryInterceptor @@ -163,6 +164,19 @@ def test_upgrade_channel_to_auth(): assert isinstance(out_ch._interceptor, AuthUnaryInterceptor) # noqa +def test_upgrade_channel_to_proxy_auth(): + ch = MagicMock() + out_ch = upgrade_channel_to_proxy_authenticated( + PlatformConfig( + auth_mode="Pkce", + proxy_command=["echo", "foo-bar"], + ), + ch, + ) + assert isinstance(out_ch._interceptor, AuthUnaryInterceptor) + assert isinstance(out_ch._interceptor._authenticator, CommandAuthenticator) + + def test_load_cert(): cert_file = os.path.join(os.path.dirname(__file__), "testdata", "rootCACert.pem") f = load_cert(cert_file)