diff options
Diffstat (limited to 'meta/lib/oeqa/sdk/buildtools-cases/https.py')
-rw-r--r-- | meta/lib/oeqa/sdk/buildtools-cases/https.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/meta/lib/oeqa/sdk/buildtools-cases/https.py b/meta/lib/oeqa/sdk/buildtools-cases/https.py new file mode 100644 index 0000000000..4525e3d758 --- /dev/null +++ b/meta/lib/oeqa/sdk/buildtools-cases/https.py | |||
@@ -0,0 +1,22 @@ | |||
1 | # | ||
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | |||
7 | from oeqa.sdk.case import OESDKTestCase | ||
8 | from oeqa.utils.subprocesstweak import errors_have_output | ||
9 | errors_have_output() | ||
10 | |||
11 | class HTTPTests(OESDKTestCase): | ||
12 | """ | ||
13 | Verify that HTTPS certificates are working correctly, as this depends on | ||
14 | environment variables being set correctly. | ||
15 | """ | ||
16 | |||
17 | def test_wget(self): | ||
18 | self._run('env -i wget --debug --output-document /dev/null https://yoctoproject.org/connectivity.html') | ||
19 | |||
20 | def test_python(self): | ||
21 | # urlopen() returns a file-like object on success and throws an exception otherwise | ||
22 | self._run('python3 -c \'import urllib.request; urllib.request.urlopen("https://yoctoproject.org/connectivity.html")\'') | ||