summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdk/buildtools-cases
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-08-18 11:16:20 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-18 17:01:06 +0100
commit6b19caf208dac3ca7247d6c6ee2fa218b124d558 (patch)
tree51dd3989516bcbb2b08e15ce6e6fc32675d665d2 /meta/lib/oeqa/sdk/buildtools-cases
parent7cd1bae8109bf24a47e614d901c495304161acaa (diff)
downloadpoky-6b19caf208dac3ca7247d6c6ee2fa218b124d558.tar.gz
oeqa/sdk: add HTTPS test for buildtools
Verify that HTTPS connections work in both wget and Python, as this depends on variables correctly pointing to the certificate chain. (From OE-Core rev: 5c2b1fb09e786ec392979d21dc7884ca23cd84f0) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/sdk/buildtools-cases')
-rw-r--r--meta/lib/oeqa/sdk/buildtools-cases/https.py20
1 files changed, 20 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..134879aab3
--- /dev/null
+++ b/meta/lib/oeqa/sdk/buildtools-cases/https.py
@@ -0,0 +1,20 @@
1#
2# SPDX-License-Identifier: MIT
3#
4
5from oeqa.sdk.case import OESDKTestCase
6from oeqa.utils.subprocesstweak import errors_have_output
7errors_have_output()
8
9class HTTPTests(OESDKTestCase):
10 """
11 Verify that HTTPS certificates are working correctly, as this depends on
12 environment variables being set correctly.
13 """
14
15 def test_wget(self):
16 self._run('env -i wget --debug --output-document /dev/null https://www.example.com')
17
18 def test_python(self):
19 # urlopen() returns a file-like object on success and throws an exception otherwise
20 self._run('python3 -c \'import urllib.request; urllib.request.urlopen("https://www.example.com/")\'')