Skip to content

Commit

Permalink
test(salt_version): expand major_minor to allow ending in .x
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Dec 11, 2022
1 parent 2644661 commit 0242f33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/integration/test_salt_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ def test_salt_version(host, saltvers, installmethod):
cmd = host.run("salt-call --version")
# See https://github.com/saltstack/salt/blob/01b22ea1b141/salt/version.py#L54-L63
git_sha_regex = r"g?[a-f0-9]{7,40}"
major_minor = r"3\d{3}"
major_minor = r"3\d{3}(\.\d)?"
pep440_master_format = major_minor + r"\+0na." + git_sha_regex
pep440_onedir_format = major_minor + r"(rc\d)?\+\d{1,4}." + git_sha_regex
if saltvers == "master":
# New PEP440-compliant `master` format
# https://pythex.org/?regex=3%5Cd%7B3%7D%5C%2B0na.g%3F%5Ba-f0-9%5D%7B7%2C40%7D&test_string=3003%2B0na.10c4da2%0A3004%2B0na.f39e419&ignorecase=0&multiline=0&dotall=0&verbose=0
# https://pythex.org/?regex=3%5Cd%7B3%7D(%5C.%5Cd)%3F%5C%2B0na.g%3F%5Ba-f0-9%5D%7B7%2C40%7D&test_string=3004%2B0na.f39e419%0A3006.0%2B0na.d937173%20(Sulfur)&ignorecase=0&multiline=0&dotall=0&verbose=0
saltvers = pep440_master_format
elif installmethod == "onedir":
# Either: new PEP440-compliant `onedir` format or even major/minor
Expand Down

0 comments on commit 0242f33

Please sign in to comment.