summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdk/buildtools-cases/https.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/sdk/buildtools-cases/https.py')
-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 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.sdk.case import OESDKTestCase
+from oeqa.utils.subprocesstweak import errors_have_output
+errors_have_output()
+
+class HTTPTests(OESDKTestCase):
+ """
+ Verify that HTTPS certificates are working correctly, as this depends on
+ environment variables being set correctly.
+ """
+
+ def test_wget(self):
+ self._run('env -i wget --debug --output-document /dev/null https://www.example.com')
+
+ def test_python(self):
+ # urlopen() returns a file-like object on success and throws an exception otherwise
+ self._run('python3 -c \'import urllib.request; urllib.request.urlopen("https://www.example.com/")\'')