Esempio n. 1
0
def test_create_simple():
    with mock_shed_client() as tsi:
        path = os.path.join(TEST_REPOS_DIR, "single_tool")
        repo_config = shed.shed_repo_config(path)
        create_response = shed.create_repository_for(None, tsi, "single_tool", repo_config)
        assert "id" in create_response
        repo_id = shed.find_repository_id(ctx=None, tsi=tsi, path=".", name="single_tool", owner="iuc")
        assert repo_id == create_response["id"]
Esempio n. 2
0
def test_suite_repositories_different_owners():
    with mock_shed_context() as shed_context:
        path = os.path.join(TEST_REPOS_DIR,
                            "multi_repos_flat_configured_owners")
        repo_config = shed.shed_repo_config(shed_context, path)
        assert '<repository owner="iuc" name="cs-cat1" />' in \
            repo_config["repositories"]["suite_cat"]["_files"]["repository_dependencies.xml"], repo_config
        assert '<repository owner="devteam" name="cs-cat2" />' in \
            repo_config["repositories"]["suite_cat"]["_files"]["repository_dependencies.xml"], repo_config
Esempio n. 3
0
def test_create_simple():
    with mock_shed_context() as shed_context:
        path = os.path.join(TEST_REPOS_DIR, "single_tool")
        repo_config = shed.shed_repo_config(shed_context, path)
        create_response = shed.create_repository_for(
            None,
            shed_context.tsi,
            "single_tool",
            repo_config,
        )
        assert "id" in create_response
        repo_id = shed.find_repository_id(ctx=None,
                                          shed_context=shed_context,
                                          path=".",
                                          name="single_tool",
                                          owner="iuc")
        assert repo_id == create_response["id"]