blob: 4525e3d75833a9e27c1f122a109bfef05b3020c6 [file] [log] [blame]
Andrew Geisslerd159c7f2021-09-02 21:05:58 -05001#
Patrick Williams92b42cb2022-09-03 06:53:57 -05002# Copyright OpenEmbedded Contributors
3#
Andrew Geisslerd159c7f2021-09-02 21:05:58 -05004# SPDX-License-Identifier: MIT
5#
6
7from oeqa.sdk.case import OESDKTestCase
8from oeqa.utils.subprocesstweak import errors_have_output
9errors_have_output()
10
11class 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):
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000018 self._run('env -i wget --debug --output-document /dev/null https://yoctoproject.org/connectivity.html')
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050019
20 def test_python(self):
21 # urlopen() returns a file-like object on success and throws an exception otherwise
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000022 self._run('python3 -c \'import urllib.request; urllib.request.urlopen("https://yoctoproject.org/connectivity.html")\'')