Ejemplo n.º 1
0
def context(tmpdir):
    context = Context()
    context.config = get_default_config()
    context.config["signing_server_config"] = SERVER_CONFIG_PATH
    context.config["work_dir"] = os.path.join(tmpdir, "work")
    context.config["artifact_dir"] = os.path.join(tmpdir, "artifact")
    context.config["taskcluster_scope_prefixes"] = [DEFAULT_SCOPE_PREFIX]
    context.signing_servers = load_signing_server_config(context)
    mkdir(context.config["work_dir"])
    mkdir(context.config["artifact_dir"])
    yield context
Ejemplo n.º 2
0
def context(tmpdir):
    context = Context()
    context.config = get_default_config()
    context.config['signing_server_config'] = SERVER_CONFIG_PATH
    context.config['work_dir'] = os.path.join(tmpdir, 'work')
    context.config['artifact_dir'] = os.path.join(tmpdir, 'artifact')
    context.config['taskcluster_scope_prefixes'] = [DEFAULT_SCOPE_PREFIX]
    context.signing_servers = load_signing_server_config(context)
    mkdir(context.config['work_dir'])
    mkdir(context.config['artifact_dir'])
    yield context
Ejemplo n.º 3
0
def context(tmpdir):
    context = Context()
    context.config = get_default_config()
    context.config["autograph_configs"] = SERVER_CONFIG_PATH
    context.config["work_dir"] = os.path.join(tmpdir, "work")
    context.config["artifact_dir"] = os.path.join(tmpdir, "artifact")
    context.config["taskcluster_scope_prefixes"] = [DEFAULT_SCOPE_PREFIX]
    context.autograph_configs = load_autograph_configs(SERVER_CONFIG_PATH)
    mkdir(context.config["work_dir"])
    mkdir(context.config["artifact_dir"])
    yield context
Ejemplo n.º 4
0
def context():
    context = Context()
    context.config = get_default_config()
    return context
Ejemplo n.º 5
0
def test_main(monkeypatch):
    sync_main_mock = MagicMock()
    monkeypatch.setattr(scriptworker.client, "sync_main", sync_main_mock)
    script.main()
    sync_main_mock.asset_called_once_with(
        script.async_main, default_config=script.get_default_config())
Ejemplo n.º 6
0
def test_get_default_config():
    parent_dir = os.path.dirname(os.getcwd())
    c = script.get_default_config()
    assert c["work_dir"] == os.path.join(parent_dir, "work_dir")