use of com.googlecode.junit.ext.RunIf in project gocd by gocd.
the class CommandRepositoryDirectoryWalkerTest method shouldUpdateServerHealthServiceIfTheCommandRepositoryDirectoryDoesNotExist.
@Test
@RunIf(value = EnhancedOSChecker.class, arguments = { DO_NOT_RUN_ON, WINDOWS })
public void shouldUpdateServerHealthServiceIfTheCommandRepositoryDirectoryDoesNotExist() throws IOException {
File nonExistentDirectory = new File("dirDoesNotExist");
walker.getAllCommandSnippets(nonExistentDirectory.getPath());
verify(serverHealthService).update(serverHealthWarningMessageWhichContains("Failed to access command repository located in Go Server Directory at " + nonExistentDirectory.getPath() + ". The directory does not exist or Go does not have sufficient permissions to access it."));
}
use of com.googlecode.junit.ext.RunIf in project gocd by gocd.
the class MagicalGoConfigXmlLoaderTest method shouldNotAllowAbsoluteDestFolderNamesOnLinux.
@Test
@RunIf(value = EnhancedOSChecker.class, arguments = { DO_NOT_RUN_ON, WINDOWS })
public void shouldNotAllowAbsoluteDestFolderNamesOnLinux() throws Exception {
String materials1 = " <materials>\n" + " <svn url=\"/hgrepo2\" dest=\"/tmp/foo\" />\n" + " </materials>\n";
MagicalGoConfigXmlLoaderFixture.assertNotValid("Dest folder '/tmp/foo' is not valid. It must be a sub-directory of the working folder.", materials1);
}
Aggregations