diff options
Diffstat (limited to 'upstream-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth')
| -rw-r--r-- | upstream-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth/0001-python3-google-auth-Skip-mTLS-tests-in-ptest-environ.patch | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/upstream-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth/0001-python3-google-auth-Skip-mTLS-tests-in-ptest-environ.patch b/upstream-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth/0001-python3-google-auth-Skip-mTLS-tests-in-ptest-environ.patch index 1b09043748..345c25cfb3 100644 --- a/upstream-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth/0001-python3-google-auth-Skip-mTLS-tests-in-ptest-environ.patch +++ b/upstream-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth/0001-python3-google-auth-Skip-mTLS-tests-in-ptest-environ.patch @@ -18,15 +18,15 @@ in the embedded ptest runtime without external certificate infrastructure. Upstream-Status: Inappropriate [ptest environment limitation] Signed-off-by: Khem Raj <raj.khem@gmail.com> --- - tests/transport/test_requests.py | 7 ++++++- + tests/transport/test_requests.py | 6 ++++++ tests/transport/test_urllib3.py | 2 ++ - 2 files changed, 8 insertions(+), 1 deletion(-) + 2 files changed, 8 insertions(+) diff --git a/tests/transport/test_requests.py b/tests/transport/test_requests.py -index 0da3e36..3a62ef7 100644 +index f14ccea..6a1cc55 100644 --- a/tests/transport/test_requests.py +++ b/tests/transport/test_requests.py -@@ -176,6 +176,7 @@ class TimeTickAdapterStub(AdapterStub): +@@ -178,6 +178,7 @@ class TimeTickAdapterStub(AdapterStub): class TestMutualTlsAdapter(object): @mock.patch.object(requests.adapters.HTTPAdapter, "init_poolmanager") @mock.patch.object(requests.adapters.HTTPAdapter, "proxy_manager_for") @@ -34,24 +34,23 @@ index 0da3e36..3a62ef7 100644 def test_success(self, mock_proxy_manager_for, mock_init_poolmanager): adapter = google.auth.transport.requests._MutualTlsAdapter( pytest.public_cert_bytes, pytest.private_key_bytes -@@ -187,6 +188,7 @@ class TestMutualTlsAdapter(object): +@@ -189,6 +190,7 @@ class TestMutualTlsAdapter(object): adapter.proxy_manager_for() mock_proxy_manager_for.assert_called_with(ssl_context=adapter._ctx_proxymanager) + @pytest.mark.skip(reason="mTLS requires certificates not available in ptest") def test_invalid_cert_or_key(self): - with pytest.raises(OpenSSL.crypto.Error): + with pytest.raises(exceptions.MutualTLSChannelError): google.auth.transport.requests._MutualTlsAdapter( -@@ -404,7 +406,7 @@ class TestAuthorizedSession(object): - authed_session.credentials._create_self_signed_jwt.assert_called_once_with( +@@ -408,6 +410,7 @@ class TestAuthorizedSession(object): "https://{}/".format(default_host) ) -- + + @pytest.mark.skip(reason="mTLS requires certificates not available in ptest") def test_configure_mtls_channel_with_callback(self): mock_callback = mock.Mock() mock_callback.return_value = ( -@@ -429,6 +431,7 @@ class TestAuthorizedSession(object): +@@ -432,6 +435,7 @@ class TestAuthorizedSession(object): @mock.patch( "google.auth.transport._mtls_helper.get_client_cert_and_key", autospec=True ) @@ -59,7 +58,7 @@ index 0da3e36..3a62ef7 100644 def test_configure_mtls_channel_with_metadata(self, mock_get_client_cert_and_key): mock_get_client_cert_and_key.return_value = ( True, -@@ -548,6 +551,7 @@ class TestMutualTlsOffloadAdapter(object): +@@ -888,6 +892,7 @@ class TestMutualTlsOffloadAdapter(object): google.auth.transport._custom_tls_signer.CustomTlsSigner, "attach_to_ssl_context", ) @@ -67,7 +66,7 @@ index 0da3e36..3a62ef7 100644 def test_success( self, mock_attach_to_ssl_context, -@@ -581,6 +585,7 @@ class TestMutualTlsOffloadAdapter(object): +@@ -921,6 +926,7 @@ class TestMutualTlsOffloadAdapter(object): google.auth.transport._custom_tls_signer.CustomTlsSigner, "attach_to_ssl_context", ) @@ -76,10 +75,10 @@ index 0da3e36..3a62ef7 100644 self, mock_attach_to_ssl_context, diff --git a/tests/transport/test_urllib3.py b/tests/transport/test_urllib3.py -index e832300..66af909 100644 +index 3367403..88d0963 100644 --- a/tests/transport/test_urllib3.py +++ b/tests/transport/test_urllib3.py -@@ -93,12 +93,14 @@ class ResponseStub(object): +@@ -94,12 +94,14 @@ class ResponseStub(object): class TestMakeMutualTlsHttp(object): @@ -92,5 +91,8 @@ index e832300..66af909 100644 + @pytest.mark.skip(reason="mTLS requires certificates not available in ptest") def test_crypto_error(self): - with pytest.raises(OpenSSL.crypto.Error): + with pytest.raises(exceptions.MutualTLSChannelError): google.auth.transport.urllib3._make_mutual_tls_http( +-- +2.43.0 + |
