Пример #1
0
    def test_encryption(self):
        self.task_schema = Schema({
            'task': {
                'payload': {
                    'encryptedEnv': All(Length(2), [Match(r'^wcB')])  # Must have 2 elements, starting with wcB
                }
            }
        }, required=True, extra=True)

        test_kwargs = create_firefox_test_args({
            'updates_enabled': True,
            'repo_path': 'foo/bar',
            'branch': 'mozilla-beta',
            'signing_class': 'dep-signing',
            'release_channels': ['beta'],
            'final_verify_channels': ['beta'],
            'signing_pvt_key': PVT_KEY_FILE,
            'en_US_config': {
                "platforms": {
                    "macosx64": {"task_id": "xyz"},
                    "win32": {"task_id": "xyy"}
                }
            },
        })

        graph = make_task_graph(**test_kwargs)
        do_common_assertions(graph)
        for p in ("win32", "macosx64"):
            for v in ("38.0build1", "37.0build2"):
                balrog = get_task_by_name(graph, "{}_en-US_{}_funsize_balrog_task".format(p, v))
                verify(balrog, self.task_schema)
Пример #2
0
 def test_encryption(self):
     graph = make_task_graph(
         version="42.0b2",
         next_version="42.0b3",
         appVersion="42.0",
         buildNumber=3,
         source_enabled=False,
         checksums_enabled=False,
         updates_enabled=True,
         bouncer_enabled=False,
         push_to_candidates_enabled=False,
         push_to_releases_enabled=False,
         uptake_monitoring_enabled=False,
         postrelease_version_bump_enabled=False,
         postrelease_bouncer_aliases_enabled=False,
         en_US_config={"platforms": {
             "macosx64": {"task_id": "xyz"},
             "win32": {"task_id": "xyy"}
         }},
         l10n_config={},
         partial_updates={
             "38.0": {
                 "buildNumber": 1,
                 "locales": ["de", "en-GB", "zh-TW"],
             },
             "37.0": {
                 "buildNumber": 2,
                 "locales": ["de", "en-GB", "zh-TW"],
             },
         },
         branch="mozilla-beta",
         product="firefox",
         revision="abcdef123456",
         mozharness_changeset="abcd",
         balrog_api_root="https://balrog.real/api",
         funsize_balrog_api_root="http://balrog/api",
         signing_class="dep-signing",
         release_channels=["beta"],
         final_verify_channels=["beta"],
         signing_pvt_key=PVT_KEY_FILE,
         repo_path="foo/bar",
         build_tools_repo_path='build/tools',
     )
     do_common_assertions(graph)
     for p in ("win32", "macosx64"):
         for v in ("38.0build1", "37.0build2"):
             balrog = get_task_by_name(graph, "{}_en-US_{}_funsize_balrog_task".format(p, v))
             self.assertEqual(len(balrog["task"]["payload"]["encryptedEnv"]), 2)
             self.assertTrue(
                 balrog["task"]["payload"]["encryptedEnv"][0].startswith("wcB"),
                 "Encrypted string should always start with 'wcB'")
Пример #3
0
    def test_encryption(self):
        self.task_schema = Schema(
            {
                'task': {
                    'payload': {
                        'encryptedEnv': All(Length(2), [
                            Match(r'^wcB')
                        ])  # Must have 2 elements, starting with wcB
                    }
                }
            },
            required=True,
            extra=True)

        test_kwargs = create_firefox_test_args({
            'updates_enabled':
            True,
            'repo_path':
            'foo/bar',
            'branch':
            'mozilla-beta',
            'signing_class':
            'dep-signing',
            'release_channels': ['beta'],
            'final_verify_channels': ['beta'],
            'signing_pvt_key':
            PVT_KEY_FILE,
            'en_US_config': {
                "platforms": {
                    "macosx64": {
                        "task_id": "xyz"
                    },
                    "win32": {
                        "task_id": "xyy"
                    }
                }
            },
        })

        graph = make_task_graph(**test_kwargs)
        do_common_assertions(graph)
        for p in ("win32", "macosx64"):
            for v in ("38.0build1", "37.0build2"):
                balrog = get_task_by_name(
                    graph, "{}_en-US_{}_funsize_balrog_task".format(p, v))
                verify(balrog, self.task_schema)
 def test_common_assertions(self):
     do_common_assertions(self.graph)
Пример #5
0
 def test_common_assertions(self):
     do_common_assertions(self.graph)