Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 1 | # |
| 2 | # SPDX-License-Identifier: MIT |
| 3 | # |
| 4 | |
| 5 | from oeqa.sdk.case import OESDKTestCase |
| 6 | from oeqa.utils.subprocesstweak import errors_have_output |
| 7 | errors_have_output() |
| 8 | |
| 9 | class 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): |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 16 | 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] | 17 | |
| 18 | def test_python(self): |
| 19 | # 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] | 20 | self._run('python3 -c \'import urllib.request; urllib.request.urlopen("https://yoctoproject.org/connectivity.html")\'') |