mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-28 01:10:49 +01:00
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:
@@ -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"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user