Esempio n. 1
0
def test_loader_h2_tests():
    manifest_json = {
        "items": {
            "testharness": {
                "a": {
                    "foo.html": [
                        "abcdef123456",
                        [None, {}],
                    ],
                    "bar.h2.html": [
                        "uvwxyz987654",
                        [None, {}],
                    ],
                }
            }
        },
        "url_base": "/",
        "version": 8,
    }
    manifest = WPTManifest.from_json("/", manifest_json)

    # By default, the loader should include the h2 test.
    loader = Loader({manifest: {"metadata_path": ""}}, ["testharness"], None)
    assert "testharness" in loader.tests
    assert len(loader.tests["testharness"]) == 2
    assert len(loader.disabled_tests) == 0

    # We can also instruct it to skip them.
    loader = Loader({manifest: {"metadata_path": ""}}, ["testharness"], None, include_h2=False)
    assert "testharness" in loader.tests
    assert len(loader.tests["testharness"]) == 1
    assert "testharness" in loader.disabled_tests
    assert len(loader.disabled_tests["testharness"]) == 1
    assert loader.disabled_tests["testharness"][0].url == "/a/bar.h2.html"
def scp_manifest():
    # determine manifest version
    manifest = Manifest(os.environ.get('MANIFEST_FILE_PATH'))
    if manifest.version == VERSION_1:
        get_scp_input = SCPParser()
        return get_scp_input.parse_scp_manifest_v1()
    elif manifest.version == VERSION_2:
        get_scp_input = SCPParser()
        return get_scp_input.parse_scp_manifest_v2()
def stack_set_manifest():
    # determine manifest version
    manifest = Manifest(os.environ.get('MANIFEST_FILE_PATH'))
    send = SolutionMetrics(logger)
    if manifest.version == VERSION_1:
        data = {"ManifestVersion": VERSION_1}
        send.solution_metrics(data)
        get_stack_set_input = StackSetParser()
        return get_stack_set_input.parse_stack_set_manifest_v1()
    elif manifest.version == VERSION_2:
        data = {"ManifestVersion": VERSION_2}
        send.solution_metrics(data)
        get_stack_set_input = StackSetParser()
        return get_stack_set_input.parse_stack_set_manifest_v2()
 def __init__(self):
     self.logger = logger
     self.manifest = Manifest(os.environ.get('MANIFEST_FILE_PATH'))
 def __init__(self, logger):
     self.logger = logger
     self.s3 = S3(logger)
     self.param_handler = CFNParamsHandler(logger)
     self.manifest = Manifest(os.environ.get('MANIFEST_FILE_PATH'))
     self.manifest_folder = os.environ.get('MANIFEST_FOLDER')
Esempio n. 6
0
def process(site, location, username, password):
    mf = Manifest(site, location, username, password)
    if mf.download():
        pass

    return mf.process()