-
Notifications
You must be signed in to change notification settings - Fork 39
feat!: add support to publish to huawei store #1475
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -166,6 +166,10 @@ def generate_fenix_config(self): | |
| "service_account_id": "123", | ||
| "access_token": "456", | ||
| }, | ||
| "huawei": { | ||
| "client_id": "789", | ||
| "access_token": "abc", | ||
| }, | ||
| }, | ||
| }, | ||
| } | ||
|
|
@@ -238,6 +242,8 @@ def test_main_fennec_style(self, push_apk): | |
| skip_checks_fennec=False, | ||
| sgs_service_account_id=None, | ||
| sgs_access_token=None, | ||
| huawei_client_id=None, | ||
| huawei_access_token=None, | ||
| submit=False, | ||
| ) | ||
|
|
||
|
|
@@ -268,6 +274,8 @@ def test_main_focus_style(self, push_apk): | |
| skip_checks_fennec=True, | ||
| sgs_service_account_id=None, | ||
| sgs_access_token=None, | ||
| huawei_client_id=None, | ||
| huawei_access_token=None, | ||
| submit=False, | ||
| ) | ||
|
|
||
|
|
@@ -298,6 +306,8 @@ def test_main_fenix_style(self, push_apk): | |
| skip_checks_fennec=True, | ||
| sgs_service_account_id=None, | ||
| sgs_access_token=None, | ||
| huawei_client_id=None, | ||
| huawei_access_token=None, | ||
| submit=False, | ||
| ) | ||
|
|
||
|
|
@@ -328,6 +338,8 @@ def test_main_downloads_verifies_signature_and_gives_the_right_config_to_mozapkp | |
| skip_checks_fennec=False, | ||
| sgs_service_account_id=None, | ||
| sgs_access_token=None, | ||
| huawei_client_id=None, | ||
| huawei_access_token=None, | ||
| submit=False, | ||
| ) | ||
|
|
||
|
|
@@ -358,6 +370,8 @@ def test_main_allows_rollout_percentage(self, push_apk): | |
| skip_checks_fennec=False, | ||
| sgs_service_account_id=None, | ||
| sgs_access_token=None, | ||
| huawei_client_id=None, | ||
| huawei_access_token=None, | ||
| submit=False, | ||
| ) | ||
|
|
||
|
|
@@ -389,6 +403,8 @@ def test_main_allows_commit_transaction(self, push_apk): | |
| skip_checks_fennec=False, | ||
| sgs_service_account_id=None, | ||
| sgs_access_token=None, | ||
| huawei_client_id=None, | ||
| huawei_access_token=None, | ||
| submit=False, | ||
| ) | ||
|
|
||
|
|
@@ -420,5 +436,40 @@ def test_main_with_samsung_store(self, push_apk): | |
| skip_checks_fennec=True, | ||
| sgs_service_account_id="123", | ||
| sgs_access_token="456", | ||
| huawei_client_id=None, | ||
| huawei_access_token=None, | ||
| submit=False, | ||
| ) | ||
|
|
||
| @unittest.mock.patch("pushapkscript.publish.push_apk") | ||
| def test_main_with_huawei_store(self, push_apk): | ||
| task_generator = TaskGenerator(should_commit_transaction=True, store="huawei") | ||
|
|
||
| self.write_task_file(task_generator.generate_task("fenix", channel="release")) | ||
|
|
||
| self._copy_all_apks_to_test_temp_dir(task_generator) | ||
| self.keystore_manager.add_certificate("nightly") | ||
| main(config_path=self.config_generator.generate_fenix_config()) | ||
|
|
||
| push_apk.assert_called_with( | ||
| apks=[ | ||
| MockFile("{}/work/cot/{}/public/build/target.apk".format(self.test_temp_dir, task_generator.arm_task_id)), | ||
| MockFile("{}/work/cot/{}/public/build/target.apk".format(self.test_temp_dir, task_generator.x86_task_id)), | ||
| ], | ||
| secret=None, | ||
| track=None, | ||
| expected_package_names=["org.mozilla.fenix"], | ||
| store="huawei", | ||
| rollout_percentage=None, | ||
| dry_run=False, | ||
| contact_server=True, | ||
| skip_check_multiple_locales=True, | ||
| skip_check_ordered_version_codes=False, | ||
| skip_check_same_locales=True, | ||
| skip_checks_fennec=True, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't block the merge: What are the reasons for skipping the Fennec checks? For reference, this is what they do: This flag was introduced in mozilla-releng/mozapkpublisher#156 to support more products than Firefox itself. Firefox for Android has its quirks compare to simpler apps. |
||
| sgs_service_account_id=None, | ||
| sgs_access_token=None, | ||
| huawei_client_id="789", | ||
| huawei_access_token="abc", | ||
| submit=False, | ||
| ) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: what was your experience between mozapkpublisher and pushapkscript? Did the split make it easier to test changes locally? If you were to implement a worker that publishes to Android stores, would you split these 2 packages?
I don't have any preferences in the answer, I just want to gauge if this split is still worth it today.