Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_upstream_artifacts_full_paths_per_task_id(): Add test to ensure s… #245

Merged
merged 1 commit into from Jul 10, 2018

Conversation

JohanLorenzo
Copy link
Contributor

…ome edge cases are covered

While working on mozilla-releng/beetmoverscript#163, I had a doubt on whether get_upstream_artifacts_full_paths_per_task_id() was able to handle payloads like:

{
  "upstreamArtifacts": [{
    "taskId": "one",
    "paths": ["some_path"]
  }, {
    "taskId": "one",
    "paths": ["some_other_path"]
  }]
}

It turns out it can! I updated the test to cover this kind of use case + 2 others.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling dec8301 on JohanLorenzo:ensure-all-files into dc48da8 on mozilla-releng:master.

Copy link
Contributor

@MihaiTabara MihaiTabara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for adding these! TIL that was possible :)

'taskId': 'dependency3',
'taskType': 'signing',
}, {
# Case where the same taskId was given. In some occasion we may want to split
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, this is neat, wasn't sure this is possible.

try:
os.makedirs(os.path.join(folder, os.path.dirname(path)))
except FileExistsError:
pass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@JohanLorenzo JohanLorenzo merged commit 505b917 into mozilla-releng:master Jul 10, 2018
@JohanLorenzo JohanLorenzo deleted the ensure-all-files branch March 5, 2019 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants