forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ClickHouse#36028 from ClickHouse/backport/fix-rele…
…ase-workflow Backport/fix release workflow
- Loading branch information
Showing
8 changed files
with
88 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env python | ||
|
||
import unittest | ||
from argparse import ArgumentTypeError | ||
|
||
import version_helper as vh | ||
|
||
|
||
class TestFunctions(unittest.TestCase): | ||
def test_version_arg(self): | ||
cases = ( | ||
("0.0.0.0", vh.get_version_from_string("0.0.0.0")), | ||
("1.1.1.2", vh.get_version_from_string("1.1.1.2")), | ||
("v1.1.1.2-lts", vh.get_version_from_string("1.1.1.2")), | ||
("v1.1.1.2-prestable", vh.get_version_from_string("1.1.1.2")), | ||
("v1.1.1.2-stable", vh.get_version_from_string("1.1.1.2")), | ||
("v1.1.1.2-testing", vh.get_version_from_string("1.1.1.2")), | ||
("refs/tags/v1.1.1.2-testing", vh.get_version_from_string("1.1.1.2")), | ||
) | ||
for case in cases: | ||
version = vh.version_arg(case[0]) | ||
self.assertEqual(case[1], version) | ||
error_cases = ( | ||
"0.0.0", | ||
"1.1.1.a", | ||
"1.1.1.1.1", | ||
"1.1.1.2-testing", | ||
"v1.1.1.2-testin", | ||
"refs/tags/v1.1.1.2-testin", | ||
) | ||
for case in error_cases: | ||
with self.assertRaises(ArgumentTypeError): | ||
version = vh.version_arg(case[0]) |