File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
tests/flytekit/unit/clients Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 2121 get_session ,
2222 load_cert ,
2323 upgrade_channel_to_authenticated ,
24+ upgrade_channel_to_proxy_authenticated ,
2425 wrap_exceptions_channel ,
2526)
2627from flytekit .clients .grpc_utils .auth_interceptor import AuthUnaryInterceptor
@@ -163,6 +164,19 @@ def test_upgrade_channel_to_auth():
163164 assert isinstance (out_ch ._interceptor , AuthUnaryInterceptor ) # noqa
164165
165166
167+ def test_upgrade_channel_to_proxy_auth ():
168+ ch = MagicMock ()
169+ out_ch = upgrade_channel_to_proxy_authenticated (
170+ PlatformConfig (
171+ auth_mode = "Pkce" ,
172+ proxy_command = ["echo" , "foo-bar" ],
173+ ),
174+ ch ,
175+ )
176+ assert isinstance (out_ch ._interceptor , AuthUnaryInterceptor )
177+ assert isinstance (out_ch ._interceptor ._authenticator , CommandAuthenticator )
178+
179+
166180def test_load_cert ():
167181 cert_file = os .path .join (os .path .dirname (__file__ ), "testdata" , "rootCACert.pem" )
168182 f = load_cert (cert_file )
You can’t perform that action at this time.
0 commit comments