2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-01 23:25:38 +00:00

Add a pytest mark for system tests that require Internet connection

We skip those by default as:

a) we don't want to stress the upstream servers in every CI pipeline
b) system tests need to be runnable in a isolated environment by default

(cherry picked from commit 3a8ffc74df)
This commit is contained in:
Štěpán Balážik
2025-06-19 09:53:20 +02:00
parent 02cf400dc9
commit e2a91c06c8
2 changed files with 15 additions and 2 deletions

View File

@@ -265,10 +265,13 @@ stages:
rules: rules:
- if: '$CI_PIPELINE_SOURCE =~ /^(api|pipeline|schedule|trigger|web)$/' - if: '$CI_PIPELINE_SOURCE =~ /^(api|pipeline|schedule|trigger|web)$/'
.default-triggering-rules_list: &default_triggering_rules_list
- if: '$CI_PIPELINE_SOURCE =~ /^(api|merge_request_event|pipeline|schedule|trigger|web)$/'
- if: '$CI_COMMIT_TAG != null'
.default-triggering-rules: &default_triggering_rules .default-triggering-rules: &default_triggering_rules
rules: rules:
- if: '$CI_PIPELINE_SOURCE =~ /^(api|merge_request_event|pipeline|schedule|trigger|web)$/' - *default_triggering_rules_list
- if: '$CI_COMMIT_TAG != null'
.precheck: &precheck_job .precheck: &precheck_job
<<: *default_triggering_rules <<: *default_triggering_rules
@@ -1004,6 +1007,11 @@ system:gcc:bookworm:amd64:
needs: # using artifacts from unit test job is required for gcov needs: # using artifacts from unit test job is required for gcov
- job: unit:gcc:bookworm:amd64 - job: unit:gcc:bookworm:amd64
artifacts: true artifacts: true
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
variables:
CI_ENABLE_LIVE_INTERENT_TESTS: 1
- *default_triggering_rules_list
unit:gcc:bookworm:amd64: unit:gcc:bookworm:amd64:
<<: *debian_bookworm_amd64_image <<: *debian_bookworm_amd64_image

View File

@@ -23,6 +23,11 @@ long_test = pytest.mark.skipif(
not os.environ.get("CI_ENABLE_LONG_TESTS"), reason="CI_ENABLE_LONG_TESTS not set" not os.environ.get("CI_ENABLE_LONG_TESTS"), reason="CI_ENABLE_LONG_TESTS not set"
) )
live_internet_test = pytest.mark.skipif(
not os.environ.get("CI_ENABLE_LIVE_INTERNET_TESTS"),
reason="CI_ENABLE_LIVE_INTERNET_TESTS not set",
)
def feature_test(feature): def feature_test(feature):
feature_test_bin = os.environ["FEATURETEST"] feature_test_bin = os.environ["FEATURETEST"]