Files
poky/meta/lib/oeqa/sdk/buildtools-cases/https.py
Richard Purdie 1c865e6646 oeqa/buildtools: Switch to our webserver instead of example.com
Similarly to the sanity connectivity check, switch away from example.com
for the buildtools tests.

(From OE-Core rev: 31a415d1ddd5201dbce717c3a6508868161608a9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit ed10f3c2b4c678069fe1cee73f79f6e388c7777e)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-24 11:12:39 +00:00

21 lines
714 B
Python

#
# 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://yoctoproject.org/connectivity.html')
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://yoctoproject.org/connectivity.html")\'')