mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-06 12:20:56 +01:00
#8771 implement integration tests
This commit is contained in:
@@ -7,7 +7,9 @@ import org.junit.Test;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.Parameterized;
|
||||
import sonia.scm.repository.client.api.RepositoryClient;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
|
||||
@@ -23,7 +25,7 @@ public class RepositoryAccessITCase {
|
||||
public TemporaryFolder tempFolder = new TemporaryFolder();
|
||||
|
||||
private final String repositoryType;
|
||||
private RepositoryUtil repositoryUtil;
|
||||
private File folder;
|
||||
|
||||
public RepositoryAccessITCase(String repositoryType) {
|
||||
this.repositoryType = repositoryType;
|
||||
@@ -35,16 +37,17 @@ public class RepositoryAccessITCase {
|
||||
}
|
||||
|
||||
@Before
|
||||
public void initClient() throws IOException {
|
||||
public void initClient() {
|
||||
TestData.createDefault();
|
||||
repositoryUtil = new RepositoryUtil(repositoryType, tempFolder.getRoot());
|
||||
folder = tempFolder.getRoot();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldFindBranches() throws IOException {
|
||||
assumeFalse("There are no branches for SVN", repositoryType.equals("svn"));
|
||||
|
||||
repositoryUtil.createAndCommitFile("a.txt", "a");
|
||||
RepositoryClient repositoryClient = RepositoryUtil.createRepositoryClient(repositoryType, folder );
|
||||
RepositoryUtil.createAndCommitFile(folder, repositoryClient, "scmadmin", "a.txt", "a");
|
||||
|
||||
String branchesUrl = given()
|
||||
.when()
|
||||
|
||||
Reference in New Issue
Block a user