Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
driazati committed Dec 5, 2022
1 parent 6822115 commit 1e318d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions ci/scripts/jenkins/open_docker_update_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,16 @@ def latest_tlcpackstaging_image(source: str) -> Optional[str]:
replacements = {}

for line in content:
m = re.match(r"^(ci_[a-zA-Z0-9]+) = \"(.*)\"", line.strip())
m = re.match(r'"tag": "(.*)",', line.strip())
if m is not None:
image_spec = m.groups()[0]
logging.info(f"Found match on line {line.strip()}")
groups = m.groups()
new_image = latest_tlcpackstaging_image(groups[1])
new_image = latest_tlcpackstaging_image(image_spec)
if new_image is None:
logging.info(f"No new image found")
else:
logging.info(f"Using new image {new_image}")
new_line = f"{groups[0]} = '{new_image}'\n"
new_line = f' "tag": "{new_image}",'
replacements[line] = new_line

# Re-generate the Jenkinsfiles
Expand Down
4 changes: 2 additions & 2 deletions tests/python/ci/test_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,7 @@ def test_github_tag_teams(tmpdir_factory, source_type, data, check):
},
expected="Using tlcpackstaging tag on tlcpack",
expected_images=[
"ci_arm = 'tlcpack/ci-arm:456-456-abc'",
'"tag": "tlcpack/ci-arm:456-456-abc"',
],
),
tlcpack_update=dict(
Expand All @@ -1235,7 +1235,7 @@ def test_github_tag_teams(tmpdir_factory, source_type, data, check):
},
expected="Found newer image, using: tlcpack",
expected_images=[
"ci_arm = 'tlcpack/ci-arm:234-234-abc'",
'"tag": "tlcpack/ci-arm:234-234-abc",',
],
),
)
Expand Down

0 comments on commit 1e318d8

Please sign in to comment.