Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Commit

Permalink
ci/backend/tuxsuite.py: allow dots in tuxsuite job id
Browse files Browse the repository at this point in the history
Signed-off-by: Charles Oliveira <[email protected]>
  • Loading branch information
chaws committed Dec 7, 2023
1 parent 7a059a9 commit 38f34ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion squad/ci/backend/tuxsuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def parse_job_id(self, job_id):
"""

regex = r'^(OEBUILD|BUILD|TEST):([0-9a-z_\-]+@[0-9a-z_\-]+)#([a-zA-Z0-9]+)$'
regex = r'^(OEBUILD|BUILD|TEST):([0-9a-z_\-.]+@[0-9a-z_\-.]+)#([a-zA-Z0-9]+)$'
matches = re.findall(regex, job_id)
if len(matches) == 0:
raise FetchIssue(f'Job id "{job_id}" does not match "{regex}"')
Expand Down
3 changes: 3 additions & 0 deletions test/ci/backend/test_tuxsuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ def test_parse_job_id(self):
result = self.tuxsuite.parse_job_id('TEST:linaro@anders#1yPYGaOEPNwr2pCqBgONY43zORq')
self.assertEqual(('TEST', 'linaro@anders', '1yPYGaOEPNwr2pCqBgONY43zORq'), result)

result = self.tuxsuite.parse_job_id('TEST:[email protected]#1yPYGaOEPNwr2pCqBgONY43zORq')
self.assertEqual(('TEST', '[email protected]', '1yPYGaOEPNwr2pCqBgONY43zORq'), result)

with self.assertRaises(FetchIssue):
self.tuxsuite.parse_job_id('not-really-vallid')

Expand Down

0 comments on commit 38f34ab

Please sign in to comment.