oslo.service/oslo_service
Hervé Beraud bfc8172942 Fix some SSL tests for wsgi module under python 3
Previously some tests were ignored under python 3 environment, this was
due to some design changes introduced by python 3.7 [1] in the SSL
module of the stdlib. These changes reactivate some of them (some other
are still skipped and needs further works).

Indeed, when we try to use requests with SSL in a monkey patched
environment we faced the following issue:

```
TypeError: wrap_socket() got an unexpected keyword argument '_context'
```

This is due to the fact that we are in a monkey patched environment
where `requests` is monkey patched too.

We don't need `request` for our needs. Indeed we can easily send
http requests through low level socket. Our main goal is to test
our wsgi server and not to test the `requests` library, and `requests`
was just used to make the code more simpler.

In our case we can implement a code dedicated to send request to our green
server, unlock our tests and move away from this bug/side effect.

These changes move away from `requests` which is badly monkey patched by
eventlet [1]. Now we use monkey patched socket and ssl to
request the green server which is executed in background. Low level
(monkey patched) modules could help us to skirt layers that are possibly
badly monkey patched on higher level modules (urllib, requests, etc...).

[1] https://github.com/eventlet/eventlet/issues/526#issuecomment-482694279
[2] https://github.com/eventlet/eventlet/issues/526

Change-Id: Id44ad12a1cf3fd7090a67bb6e8e42bfdc47502cf
Partial-Bug: #1482633
2020-06-16 12:58:13 +02:00
..
locale/en_GB/LC_MESSAGES Imported Translations from Zanata 2018-03-01 06:11:58 +00:00
tests Fix some SSL tests for wsgi module under python 3 2020-06-16 12:58:13 +02:00
__init__.py Remove monotonic usage 2020-05-05 09:37:02 -05:00
_i18n.py Update URLs in documents according to document migration 2017-07-12 23:28:29 +08:00
_options.py Make PID availabe as formatstring in backdoor path 2019-05-22 16:21:44 +02:00
eventlet_backdoor.py Stop to use the __future__ module. 2020-06-02 20:40:55 +02:00
fixture.py Use eventletutils Event class 2019-01-10 22:06:11 +00:00
loopingcall.py Drop six usages 2020-05-26 15:20:01 +02:00
periodic_task.py Drop six usages 2020-05-26 15:20:01 +02:00
service.py Drop six usages 2020-05-26 15:20:01 +02:00
sslutils.py Add Bandit to tox for security static analysis 2015-12-01 16:10:15 +03:00
systemd.py Fix argument type for _sd_notify() on python3 2016-03-31 10:51:19 -06:00
threadgroup.py Deprecate the ThreadGroup.cancel() API 2018-12-20 11:11:23 +13:00
version.py pbr.version.VersionInfo needs package name (oslo.xyz and not oslo_xyz) 2017-02-06 12:49:21 -05:00
wsgi.py Stop to use the __future__ module. 2020-06-02 20:40:55 +02:00