From 88a815c84e15096af91f250c0985784cf35a810c 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 ++++++++ .../protocols/esp_http_client/pytest_esp_http_client.py | 8 ++++++-- pytest.ini | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/target-test.yml b/.gitlab/ci/target-test.yml index 349a30da7b..8ecce53b56 100644 --- a/.gitlab/ci/target-test.yml +++ b/.gitlab/ci/target-test.yml @@ -135,6 +135,14 @@ example_test_pytest_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] + example_test_pytest_esp32_8mb_flash: extends: - .pytest_examples_dir_template 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 c61d41f20f..c4cb4a4758 100644 --- a/examples/protocols/esp_http_client/pytest_esp_http_client.py +++ b/examples/protocols/esp_http_client/pytest_esp_http_client.py @@ -11,7 +11,7 @@ from pytest_embedded import Dut @pytest.mark.esp32c3 @pytest.mark.esp32s2 @pytest.mark.esp32s3 -@pytest.mark.ethernet +@pytest.mark.httpbin def test_examples_protocol_esp_http_client(dut: Dut) -> None: """ steps: | @@ -57,7 +57,11 @@ def test_examples_protocol_esp_http_client(dut: Dut) -> None: dut.expect('Finish http example') -@pytest.mark.parametrize('config', [pytest.param('ssldyn', marks=[pytest.mark.supported_targets, pytest.mark.ethernet]),], indirect=True) +@pytest.mark.supported_targets +@pytest.mark.httpbin +@pytest.mark.parametrize('config', [ + 'ssldyn', +], indirect=True) def test_examples_protocol_esp_http_client_dynamic_buffer(dut: Dut) -> None: # test mbedtls dynamic resource # check and log bin size diff --git a/pytest.ini b/pytest.ini index b0d8997b71..3cb5224643 100644 --- a/pytest.ini +++ b/pytest.ini @@ -47,6 +47,7 @@ markers = ir_transceiver: runners with a pair of IR transmitter and receiver flash_encryption_wifi_high_traffic: Flash Encryption runners with wifi high traffic support ethernet: ethernet runner + httpbin: runner for tests that need to access the httpbin service ethernet_flash_8m: ethernet runner with 8mb flash ethernet_router: both the runner and dut connect to the same router through ethernet NIC wifi_ap: a wifi AP in the environment