use of jetbrains.buildServer.serverSide.TeamCityProperties in project teamcity-git by JetBrains.
the class MapFullPathTest method setUp.
@BeforeMethod
public void setUp() throws IOException {
new TeamCityProperties() {
{
setModel(new BasePropertiesModel() {
});
}
};
myTempFiles = new TempFiles();
myContext = new Mockery() {
{
setImposteriser(ClassImposteriser.INSTANCE);
}
};
myRemoteRepositoryDir = myTempFiles.createTempDir();
copyRepository(dataFile("repo_for_fetch.1"), myRemoteRepositoryDir);
myRemoteRepositoryDir2 = myTempFiles.createTempDir();
copyRepository(dataFile("repo.git"), myRemoteRepositoryDir2);
ServerPaths paths = new ServerPaths(myTempFiles.createTempDir().getAbsolutePath());
GitSupportBuilder gitBuilder = gitSupport().withServerPaths(paths);
myGit = gitBuilder.build();
myMapFullPath = gitBuilder.getMapFullPath();
myRoot = vcsRoot().withId(1).withFetchUrl(myRemoteRepositoryDir.getAbsolutePath()).build();
myRootEntry = new VcsRootEntry(myRoot, CheckoutRules.DEFAULT);
myRoot2 = vcsRoot().withId(2).withFetchUrl(myRemoteRepositoryDir2.getAbsolutePath()).build();
myRootEntry2 = new VcsRootEntry(myRoot2, CheckoutRules.DEFAULT);
}
use of jetbrains.buildServer.serverSide.TeamCityProperties in project teamcity-git by JetBrains.
the class GitResetCacheHandlerTest method setUp.
@BeforeMethod
public void setUp() throws IOException {
new TeamCityProperties() {
{
setModel(new BasePropertiesModel() {
});
}
};
myContext = new Mockery() {
{
setImposteriser(ClassImposteriser.INSTANCE);
}
};
myTempFiles = new TempFiles();
myCachesDir = myTempFiles.createTempDir();
myRepositoryManager = myContext.mock(RepositoryManager.class);
myCacheHandler = new GitResetCacheHandler(myRepositoryManager, new GcErrors());
}
use of jetbrains.buildServer.serverSide.TeamCityProperties in project teamcity-git by JetBrains.
the class GitPatchTest method setUp.
@BeforeMethod
public void setUp() throws Exception {
super.setUp();
new TeamCityProperties() {
{
setModel(new BasePropertiesModel() {
});
}
};
Mockery context = new Mockery();
ServerPaths serverPaths = new ServerPaths(myTempFiles.createTempDir().getAbsolutePath());
myConfigBuilder = new PluginConfigBuilder(serverPaths);
File repoGitDir = dataFile("repo.git");
File tmpDir = myTempFiles.createTempDir();
myMainRepositoryDir = new File(tmpDir, "repo.git");
copyRepository(repoGitDir, myMainRepositoryDir);
copyRepository(dataFile("submodule.git"), new File(tmpDir, "submodule"));
copyRepository(dataFile("submodule.git"), new File(tmpDir, "submodule.git"));
copyRepository(dataFile("sub-submodule.git"), new File(tmpDir, "sub-submodule.git"));
myResetCacheManager = context.mock(ResetCacheRegister.class);
context.checking(new Expectations() {
{
allowing(myResetCacheManager).registerHandler(with(any(ResetCacheHandler.class)));
}
});
myPropertiesBeforeTest = GitTestUtil.copyCurrentProperties();
}
use of jetbrains.buildServer.serverSide.TeamCityProperties in project teamcity-git by JetBrains.
the class SSLInvestigatorTest method setUp.
@BeforeMethod
public void setUp() throws Exception {
myHomeDirectory = myTempFiles.createTempDir();
myTempDirectory = myTempFiles.createTempDir();
new TeamCityProperties() {
{
setModel(new BasePropertiesModel() {
});
}
};
myMockery = new Mockery() {
{
setImposteriser(ClassImposteriser.INSTANCE);
}
};
myLoggingFactory = new LoggingGitMetaFactory();
}
use of jetbrains.buildServer.serverSide.TeamCityProperties in project teamcity-git by JetBrains.
the class RepositoryManagerTest method setUp.
@BeforeMethod
public void setUp() throws Exception {
new TeamCityProperties() {
{
setModel(new BasePropertiesModel() {
});
}
};
myTempFiles = new TempFiles();
ServerPaths paths = new ServerPaths(myTempFiles.createTempDir().getAbsolutePath());
myPluginConfig = new PluginConfigBuilder(paths);
}
Aggregations