Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 1 | # |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame^] | 2 | # Copyright OpenEmbedded Contributors |
| 3 | # |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 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): |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 18 | self._run('env -i wget --debug --output-document /dev/null https://yoctoproject.org/connectivity.html') |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 19 | |
| 20 | def test_python(self): |
| 21 | # urlopen() returns a file-like object on success and throws an exception otherwise |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 22 | self._run('python3 -c \'import urllib.request; urllib.request.urlopen("https://yoctoproject.org/connectivity.html")\'') |