Throw error if repo is created with not supported type (#2019)

Throw error if repository is created with not supported type. Currently we only allow git, svn or hg all lowercase.
This commit is contained in:
Eduard Heimbuch
2022-05-03 16:06:38 +02:00
committed by GitHub
parent c05ddf7376
commit 77046bb6fd
7 changed files with 74 additions and 1 deletions

View File

@@ -136,6 +136,12 @@ public class DefaultRepositoryManagerTest extends ManagerTestBase<Repository> {
assertRepositoriesEquals(dbRepo, heartOfGold);
}
@Test
public void shouldThrowInvalidTypeExceptionOnCreate() {
Repository testRepo = RepositoryTestData.create42Puzzle("test_type");
assertThrows(InvalidRepositoryTypeException.class, () -> manager.create(testRepo));
}
@SubjectAware(
username = "unpriv"
)