use of org.junit.jupiter.api.condition.DisabledOnOs in project gocd by gocd.
the class SvnCommandTest method shouldRecogniseSvnAsTheSameIfURLContainsChineseCharacters.
@Test
@DisabledOnOs(OS.WINDOWS)
void shouldRecogniseSvnAsTheSameIfURLContainsChineseCharacters() throws Exception {
File working = TempDirUtils.createTempDirectoryIn(tempDir, "shouldRecogniseSvnAsTheSameIfURLContainsSpaces").toFile();
SvnTestRepo repo = new SvnTestRepo(tempDir, "a directory with 司徒空在此");
SvnMaterial material = repo.material();
assertThat(material.getUrl()).contains("%20");
InMemoryStreamConsumer output = new InMemoryStreamConsumer();
material.freshCheckout(output, new SubversionRevision("3"), working);
assertThat(output.getAllOutput()).contains("Checked out revision 3");
InMemoryStreamConsumer output2 = new InMemoryStreamConsumer();
updateMaterial(material, new SubversionRevision("4"), working, output2);
assertThat(output2.getAllOutput()).contains("Updated to revision 4");
}
use of org.junit.jupiter.api.condition.DisabledOnOs in project gocd by gocd.
the class AntTaskBuilderTest method antTaskShouldNormalizeWorkingDirectory.
@Test
@DisabledOnOs(OS.WINDOWS)
void antTaskShouldNormalizeWorkingDirectory() {
AntTask task = new AntTask();
task.setWorkingDirectory("folder1\\folder2");
CommandBuilder commandBuilder = (CommandBuilder) antTaskBuilder.createBuilder(builderFactory, task, ExecTaskBuilderTest.pipelineStub("label", "/var/cruise-agent/pipelines/cruise"), resolver);
assertThat(commandBuilder.getWorkingDir().getPath()).isEqualTo("/var/cruise-agent/pipelines/cruise/folder1/folder2");
}
use of org.junit.jupiter.api.condition.DisabledOnOs in project gocd by gocd.
the class MaterialsTest method shouldFailIfMultipleMaterialsHaveSameFolderNameSet_CaseInSensitive.
@Test
@DisabledOnOs(OS.WINDOWS)
void shouldFailIfMultipleMaterialsHaveSameFolderNameSet_CaseInSensitive() {
HgMaterialConfig materialOne = hg("http://url1", null);
materialOne.setConfigAttributes(Collections.singletonMap(ScmMaterialConfig.FOLDER, "folder"));
HgMaterialConfig materialTwo = hg("http://url2", null);
materialTwo.setConfigAttributes(Collections.singletonMap(ScmMaterialConfig.FOLDER, "foLder"));
CruiseConfig config = GoConfigMother.configWithPipelines("one");
PipelineConfig pipelineOne = config.pipelineConfigByName(new CaseInsensitiveString("one"));
pipelineOne.setMaterialConfigs(new MaterialConfigs(materialOne, materialTwo));
MaterialConfigs materials = pipelineOne.materialConfigs();
materials.validate(ConfigSaveValidationContext.forChain(config));
assertThat(materials.get(0).errors().isEmpty()).isFalse();
assertThat(materials.get(1).errors().isEmpty()).isFalse();
assertThat(materials.get(0).errors().on(ScmMaterialConfig.FOLDER)).isEqualTo("The destination directory must be unique across materials.");
assertThat(materials.get(1).errors().on(ScmMaterialConfig.FOLDER)).isEqualTo("The destination directory must be unique across materials.");
}
use of org.junit.jupiter.api.condition.DisabledOnOs in project gocd by gocd.
the class DefaultPluginLoggingServiceIntegrationTest method shouldGetCurrentLogDirectoryByLookingAtFileAppenderOfRootLogger.
@Test
@DisabledOnOs(OS.WINDOWS)
void shouldGetCurrentLogDirectoryByLookingAtFileAppenderOfRootLogger() {
FileAppender fileAppender = new FileAppender();
fileAppender.setFile("/var/log/go-server/go-server.log");
DefaultPluginLoggingService service = Mockito.spy(new DefaultPluginLoggingService(systemEnvironment));
doReturn(fileAppender).when(service).getGoServerLogFileAppender();
String currentLogDirectory = service.getCurrentLogDirectory();
assertThat(currentLogDirectory).isEqualTo("/var/log/go-server");
}
use of org.junit.jupiter.api.condition.DisabledOnOs in project cucumber-jvm by cucumber.
the class FeaturePathTest method can_parse_absolute_file_form.
@Test
@DisabledOnOs(WINDOWS)
void can_parse_absolute_file_form() {
URI uri = FeaturePath.parse("file:/path/to/file.feature");
assertAll(() -> assertThat(uri.getScheme(), is("file")), () -> assertThat(uri.getSchemeSpecificPart(), is("/path/to/file.feature")));
}
Aggregations