]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add a pytest mark for system tests that require Internet connection
authorŠtěpán Balážik <stepan@isc.org>
Thu, 19 Jun 2025 07:53:20 +0000 (09:53 +0200)
committerŠtěpán Balážik <stepan@isc.org>
Fri, 27 Jun 2025 12:10:45 +0000 (12:10 +0000)
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 3a8ffc74df5f097afa9cd2b7073dc732824e82dd)

.gitlab-ci.yml
bin/tests/system/isctest/mark.py

index 477e22c9ceba997e414c92638b9cdf0c1284fdee..7b809ba039d4d1df2731cac98c241f78628ef15c 100644 (file)
@@ -250,10 +250,13 @@ stages:
   rules:
     - 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
   rules:
-    - if: '$CI_PIPELINE_SOURCE =~ /^(api|merge_request_event|pipeline|schedule|trigger|web)$/'
-    - if: '$CI_COMMIT_TAG != null'
+    - *default_triggering_rules_list
 
 .precheck: &precheck_job
   <<: *default_triggering_rules
@@ -939,6 +942,11 @@ system:gcc:bookworm:amd64:
   needs:  # using artifacts from unit test job is required for gcov
     - job: unit:gcc:bookworm:amd64
       artifacts: true
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "schedule"'
+      variables:
+        CI_ENABLE_LIVE_INTERENT_TESTS: 1
+    - *default_triggering_rules_list
 
 unit:gcc:bookworm:amd64:
   <<: *debian_bookworm_amd64_image
index f2fa22716fb9876a26d3f0140dc6866bbcb0dfa6..44bbe1320e5d4a7f8ead460cad261316234f73b4 100644 (file)
@@ -24,6 +24,11 @@ long_test = pytest.mark.skipif(
     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):
     feature_test_bin = os.environ["FEATURETEST"]