зеркало из https://github.com/mozilla/bugbug.git
Don't redownload the component mapping file
This commit is contained in:
Родитель
65038ce23a
Коммит
3993e7ec49
|
@ -854,6 +854,9 @@ def set_commits_to_ignore(repo_dir, commits):
|
|||
def download_component_mapping():
|
||||
global path_to_component
|
||||
|
||||
if path_to_component is not None:
|
||||
return
|
||||
|
||||
utils.download_check_etag(
|
||||
"https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.v2.mozilla-central.latest.source.source-bugzilla-info/artifacts/public/components.json",
|
||||
"data/component_mapping.json",
|
||||
|
|
|
@ -328,6 +328,7 @@ def test_download_component_mapping():
|
|||
repository.download_component_mapping()
|
||||
assert len(repository.path_to_component) == 0
|
||||
|
||||
repository.path_to_component = None
|
||||
responses.reset()
|
||||
responses.add(
|
||||
responses.HEAD,
|
||||
|
@ -351,6 +352,13 @@ def test_download_component_mapping():
|
|||
assert repository.path_to_component["AUTHORS"] == "mozilla.org::Licensing"
|
||||
assert repository.path_to_component["Cargo.lock"] == "Firefox Build System::General"
|
||||
|
||||
responses.reset()
|
||||
repository.download_component_mapping()
|
||||
assert len(repository.path_to_component) == 2
|
||||
assert repository.path_to_component["AUTHORS"] == "mozilla.org::Licensing"
|
||||
assert repository.path_to_component["Cargo.lock"] == "Firefox Build System::General"
|
||||
|
||||
repository.path_to_component = None
|
||||
responses.reset()
|
||||
responses.add(
|
||||
responses.HEAD,
|
||||
|
|
Загрузка…
Ссылка в новой задаче