-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #212 from mitchhentges/194-remove-package-name-check
Fixes #194, removes "skip package-name check" option
- Loading branch information
Showing
9 changed files
with
38 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
from tempfile import NamedTemporaryFile | ||
|
||
from mozapkpublisher.common import googleplay | ||
from mozapkpublisher.common.apk.checker import AnyPackageNamesCheck | ||
from mozapkpublisher.common.exceptions import WrongArgumentGiven | ||
from mozapkpublisher.push_apk import ( | ||
push_apk, | ||
|
@@ -80,19 +79,19 @@ def _metadata(*args, **kwargs): | |
def test_invalid_rollout_percentage(edit_service_mock, monkeypatch): | ||
with pytest.raises(WrongArgumentGiven): | ||
# missing percentage | ||
push_apk(APKS, SERVICE_ACCOUNT, credentials, 'rollout', AnyPackageNamesCheck()) | ||
push_apk(APKS, SERVICE_ACCOUNT, credentials, 'rollout', []) | ||
|
||
valid_percentage = 1 | ||
invalid_track = 'production' | ||
with pytest.raises(WrongArgumentGiven): | ||
push_apk(APKS, SERVICE_ACCOUNT, credentials, invalid_track, AnyPackageNamesCheck(), rollout_percentage=valid_percentage) | ||
push_apk(APKS, SERVICE_ACCOUNT, credentials, invalid_track, [], rollout_percentage=valid_percentage) | ||
|
||
|
||
def test_valid_rollout_percentage(edit_service_mock, monkeypatch): | ||
set_up_mocks(monkeypatch, edit_service_mock) | ||
valid_percentage = 50 | ||
|
||
push_apk(APKS, SERVICE_ACCOUNT, credentials, 'rollout', AnyPackageNamesCheck(), rollout_percentage=valid_percentage) | ||
push_apk(APKS, SERVICE_ACCOUNT, credentials, 'rollout', [], rollout_percentage=valid_percentage) | ||
edit_service_mock.update_track.assert_called_once_with('rollout', ['0', '1'], valid_percentage) | ||
edit_service_mock.update_track.reset_mock() | ||
|
||
|
@@ -111,7 +110,7 @@ def test_get_ordered_version_codes(): | |
def test_upload_apk(edit_service_mock, monkeypatch): | ||
set_up_mocks(monkeypatch, edit_service_mock) | ||
|
||
push_apk(APKS, SERVICE_ACCOUNT, credentials, 'alpha', AnyPackageNamesCheck()) | ||
push_apk(APKS, SERVICE_ACCOUNT, credentials, 'alpha', []) | ||
|
||
for apk_file in (apk_arm, apk_x86): | ||
edit_service_mock.upload_apk.assert_any_call(apk_file.name) | ||
|
@@ -165,7 +164,7 @@ def test_push_apk_tunes_down_logs(monkeypatch): | |
monkeypatch.setattr('mozapkpublisher.push_apk._split_apk_metadata_per_package_name', MagicMock()) | ||
monkeypatch.setattr('mozapkpublisher.push_apk._upload_apks', MagicMock()) | ||
|
||
push_apk(APKS, SERVICE_ACCOUNT, credentials, 'alpha', AnyPackageNamesCheck(), contact_google_play=False) | ||
push_apk(APKS, SERVICE_ACCOUNT, credentials, 'alpha', [], contact_google_play=False) | ||
|
||
main_logging_mock.init.assert_called_once_with() | ||
|
||
|
@@ -194,7 +193,7 @@ def test_main(monkeypatch): | |
'--track', 'rollout', | ||
'--service-account', '[email protected]', | ||
'--credentials', file, | ||
'--skip-check-package-names', | ||
'--expected-package-name', 'org.mozilla.fennec_aurora', | ||
file | ||
] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4.0.0 | ||
4.1.0 |