From 429118b48772987b08bd991b4483178821e2c1a2 Mon Sep 17 00:00:00 2001 From: Michal Szelag Date: Sat, 16 Dec 2023 18:44:40 -0500 Subject: [PATCH] Fixing ignore-tags-newer-than inverted with ignore-tags-older-than. Also fix test Scenario name. Story: 2004614 Task: 28518 Change-Id: I0d0f633ffa4d10f4d1491589dc9da69ae9d3f463 --- jenkins_jobs/modules/project_multibranch.py | 4 ++-- tests/enum_scenarios.py | 2 +- tests/githuborg/fixtures/github-org-full.xml | 8 ++++---- tests/githuborg/fixtures/github-org-legacy-nc.xml | 8 ++++---- tests/multibranch/fixtures/scm_bitbucket_full.xml | 8 ++++---- tests/multibranch/fixtures/scm_gerrit_full.xml | 8 ++++---- tests/multibranch/fixtures/scm_git_full.xml | 8 ++++---- tests/multibranch/fixtures/scm_github_full.xml | 8 ++++---- tests/multibranch/fixtures/scm_github_legacy_nc.xml | 8 ++++---- 9 files changed, 31 insertions(+), 31 deletions(-) diff --git a/jenkins_jobs/modules/project_multibranch.py b/jenkins_jobs/modules/project_multibranch.py index 386d00175..81395a33f 100644 --- a/jenkins_jobs/modules/project_multibranch.py +++ b/jenkins_jobs/modules/project_multibranch.py @@ -1334,12 +1334,12 @@ def build_strategies(xml_parent, data): newer_than = -1 if "ignore-tags-newer-than" in tags and tags["ignore-tags-newer-than"] >= 0: newer_than = str(tags["ignore-tags-newer-than"] * 86400000) - XML.SubElement(tags_elem, "atMostMillis").text = str(newer_than) + XML.SubElement(tags_elem, "atLeastMillis").text = str(newer_than) older_than = -1 if "ignore-tags-older-than" in tags and tags["ignore-tags-older-than"] >= 0: older_than = str(tags["ignore-tags-older-than"] * 86400000) - XML.SubElement(tags_elem, "atLeastMillis").text = str(older_than) + XML.SubElement(tags_elem, "atMostMillis").text = str(older_than) if bbs_list.get("regular-branches", False): XML.SubElement( diff --git a/tests/enum_scenarios.py b/tests/enum_scenarios.py index 4c2a409b0..80d6db318 100644 --- a/tests/enum_scenarios.py +++ b/tests/enum_scenarios.py @@ -21,7 +21,7 @@ from collections import namedtuple Scenario = namedtuple( - "Scnenario", "name in_path out_paths error_path config_path plugins_info_path" + "Scenario", "name in_path out_paths error_path config_path plugins_info_path" ) diff --git a/tests/githuborg/fixtures/github-org-full.xml b/tests/githuborg/fixtures/github-org-full.xml index d17c6522f..c4b1c26a4 100644 --- a/tests/githuborg/fixtures/github-org-full.xml +++ b/tests/githuborg/fixtures/github-org-full.xml @@ -165,18 +165,18 @@ false - -1 -1 + -1 - 86400000 - 604800000 + 86400000 + 604800000 - -1 -1 + -1 true diff --git a/tests/githuborg/fixtures/github-org-legacy-nc.xml b/tests/githuborg/fixtures/github-org-legacy-nc.xml index 44bc65756..84475952f 100644 --- a/tests/githuborg/fixtures/github-org-legacy-nc.xml +++ b/tests/githuborg/fixtures/github-org-legacy-nc.xml @@ -165,18 +165,18 @@ false - -1 -1 + -1 - 86400000 - 604800000 + 86400000 + 604800000 - -1 -1 + -1 true diff --git a/tests/multibranch/fixtures/scm_bitbucket_full.xml b/tests/multibranch/fixtures/scm_bitbucket_full.xml index 3357d52bc..51a2110dd 100644 --- a/tests/multibranch/fixtures/scm_bitbucket_full.xml +++ b/tests/multibranch/fixtures/scm_bitbucket_full.xml @@ -186,18 +186,18 @@ false - -1 -1 + -1 - 86400000 - 604800000 + 86400000 + 604800000 - -1 -1 + -1 true diff --git a/tests/multibranch/fixtures/scm_gerrit_full.xml b/tests/multibranch/fixtures/scm_gerrit_full.xml index 0edb727ba..91949f546 100644 --- a/tests/multibranch/fixtures/scm_gerrit_full.xml +++ b/tests/multibranch/fixtures/scm_gerrit_full.xml @@ -137,18 +137,18 @@ false - -1 -1 + -1 - 86400000 - 604800000 + 86400000 + 604800000 - -1 -1 + -1 true diff --git a/tests/multibranch/fixtures/scm_git_full.xml b/tests/multibranch/fixtures/scm_git_full.xml index 5df740359..f3b7fa68d 100644 --- a/tests/multibranch/fixtures/scm_git_full.xml +++ b/tests/multibranch/fixtures/scm_git_full.xml @@ -144,18 +144,18 @@ false - -1 -1 + -1 - 86400000 - 604800000 + 86400000 + 604800000 - -1 -1 + -1 true diff --git a/tests/multibranch/fixtures/scm_github_full.xml b/tests/multibranch/fixtures/scm_github_full.xml index dd5b46ec1..b96dd0d03 100644 --- a/tests/multibranch/fixtures/scm_github_full.xml +++ b/tests/multibranch/fixtures/scm_github_full.xml @@ -200,18 +200,18 @@ false - -1 -1 + -1 - 86400000 - 604800000 + 86400000 + 604800000 - -1 -1 + -1 true diff --git a/tests/multibranch/fixtures/scm_github_legacy_nc.xml b/tests/multibranch/fixtures/scm_github_legacy_nc.xml index 591367990..9c62f47a0 100644 --- a/tests/multibranch/fixtures/scm_github_legacy_nc.xml +++ b/tests/multibranch/fixtures/scm_github_legacy_nc.xml @@ -181,18 +181,18 @@ false - -1 -1 + -1 - 86400000 - 604800000 + 86400000 + 604800000 - -1 -1 + -1 true