From 2aaa5579f0c0444f06b5272a5c401a3917d1bd2e Mon Sep 17 00:00:00 2001 From: Harshit Malpani Date: Tue, 18 Jul 2023 10:08:03 +0530 Subject: [PATCH] fix(ci): update HTTP client example tests runner assignment HTTP client example tests now connect with locally hosted httpbin service for more stable results across multiple runs --- .gitlab/ci/target-test.yml | 8 ++++++++ conftest.py | 1 + .../protocols/esp_http_client/pytest_esp_http_client.py | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/target-test.yml b/.gitlab/ci/target-test.yml index 4e5ccfaed1..00baf2fa58 100644 --- a/.gitlab/ci/target-test.yml +++ b/.gitlab/ci/target-test.yml @@ -265,6 +265,14 @@ pytest_examples_esp32_ethernet: - build_pytest_examples_esp32 tags: [ esp32, ethernet] +pytest_examples_esp32_ethernet_httpbin: + extends: + - .pytest_examples_dir_template + - .rules:test:example_test-esp32-ethernet + needs: + - build_pytest_examples_esp32 + tags: [ esp32, httpbin] + pytest_examples_esp32_8mb_flash: extends: - .pytest_examples_dir_template diff --git a/conftest.py b/conftest.py index 1a9dabce2c..85a5d373ef 100644 --- a/conftest.py +++ b/conftest.py @@ -123,6 +123,7 @@ ENV_MARKERS = { 'esp32eco3': 'Runner with esp32 eco3 connected', 'ecdsa_efuse': 'Runner with test ECDSA private keys programmed in efuse', 'ccs811': 'Runner with CCS811 connected', + 'httpbin': 'runner for tests that need to access the httpbin service', # multi-dut markers 'ieee802154': 'ieee802154 related tests should run on ieee802154 runners.', 'openthread_br': 'tests should be used for openthread border router.', diff --git a/examples/protocols/esp_http_client/pytest_esp_http_client.py b/examples/protocols/esp_http_client/pytest_esp_http_client.py index 84c97c6654..716524c920 100644 --- a/examples/protocols/esp_http_client/pytest_esp_http_client.py +++ b/examples/protocols/esp_http_client/pytest_esp_http_client.py @@ -8,7 +8,7 @@ from pytest_embedded import Dut @pytest.mark.esp32 -@pytest.mark.ethernet +@pytest.mark.httpbin def test_examples_protocol_esp_http_client(dut: Dut) -> None: """ steps: | @@ -55,7 +55,7 @@ def test_examples_protocol_esp_http_client(dut: Dut) -> None: @pytest.mark.esp32 -@pytest.mark.ethernet +@pytest.mark.httpbin @pytest.mark.parametrize('config', [ 'ssldyn', ], indirect=True)