Skip to content

Commit

Permalink
Add a test for buildhub checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy HUBSCHER committed Oct 30, 2017
1 parent 701d0af commit af9d6f9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pollbot/tasks/buildhub.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ async def get_build_ids_for_version(product, version, *, size=10):


async def buildhub(product, version):
if 'build' in version:
version = version.replace('build', 'rc')

try:
build_ids = await get_build_ids_for_version(product, version)
status = True
Expand Down
9 changes: 9 additions & 0 deletions tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,15 @@ async def test_candidates_buildhub(cli):
"?versions[0]=56.0.1rc2&products[0]=firefox&channel[0]=release")


async def test_candidates_buildhub_build(cli):
resp = await check_response(cli, "/v1/firefox/56.0.1build2/buildhub")
body = await resp.json()
assert body["status"] == Status.EXISTS.value
assert "Build IDs for this release: 20171002220106" == body["message"]
assert body["link"] == ("https://mozilla-services.github.io/buildhub/"
"?versions[0]=56.0.1rc2&products[0]=firefox&channel[0]=release")


async def test_release_bedrock_release_notes(cli):
await check_response(cli, "/v1/firefox/54.0/bedrock/release-notes", body={
"status": Status.EXISTS.value,
Expand Down

0 comments on commit af9d6f9

Please sign in to comment.