use of org.junit.jupiter.api.condition.DisabledOnOs in project cucumber-jvm by cucumber.
the class ResourceScannerTest method scanForResourcesDirectorySymlink.
@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Only works if repository is explicitly cloned activated symlinks and " + "developer mode in windows is activated")
void scanForResourcesDirectorySymlink() {
File file = new File("src/test/resource-symlink");
List<URI> resources = resourceScanner.scanForResourcesPath(file.toPath());
assertThat(resources, containsInAnyOrder(new File("src/test/resource-symlink/test/resource.txt").toURI(), new File("src/test/resource-symlink/test/other-resource.txt").toURI(), new File("src/test/resource-symlink/test/spaces in name resource.txt").toURI()));
}
use of org.junit.jupiter.api.condition.DisabledOnOs in project cucumber-jvm by cucumber.
the class FeaturePathTest method can_parse_absolute_directory_form.
@Test
@DisabledOnOs(WINDOWS)
void can_parse_absolute_directory_form() {
URI uri = FeaturePath.parse("file:/path/to");
assertAll(() -> assertThat(uri.getScheme(), is("file")), () -> assertThat(uri.getSchemeSpecificPart(), is("/path/to")));
}
use of org.junit.jupiter.api.condition.DisabledOnOs in project spring-security by spring-projects.
the class ApacheDSContainerTests method startWithLdapOverSsl.
/**
* This test starts an LDAP server using LDAPs (LDAP over SSL). A self-signed
* certificate is being used, which was previously generated with:
*
* <pre>
* {@code
* keytool -genkey -alias spring -keyalg RSA -keystore spring.keystore -validity 3650 -storetype JKS \
* -dname "CN=localhost, OU=Spring, O=Pivotal, L=Kailua-Kona, ST=HI, C=US" -keypass spring -storepass spring
* }
* </pre>
* @throws Exception
*/
@Test
@DisabledOnOs(OS.WINDOWS)
public void startWithLdapOverSsl() throws Exception {
final ClassPathResource keyStoreResource = new ClassPathResource("/org/springframework/security/ldap/server/spring.keystore");
final File temporaryKeyStoreFile = new File(this.temporaryFolder, "spring.keystore");
FileCopyUtils.copy(keyStoreResource.getInputStream(), new FileOutputStream(temporaryKeyStoreFile));
assertThat(temporaryKeyStoreFile).isFile();
ApacheDSContainer server = new ApacheDSContainer("dc=springframework,dc=org", "classpath:test-server.ldif");
List<Integer> ports = getDefaultPorts(1);
server.setPort(ports.get(0));
server.setLdapOverSslEnabled(true);
server.setKeyStoreFile(temporaryKeyStoreFile);
server.setCertificatePassord("spring");
try {
server.afterPropertiesSet();
} finally {
try {
server.destroy();
} catch (Throwable ex) {
}
}
}
use of org.junit.jupiter.api.condition.DisabledOnOs in project spring-security by spring-projects.
the class ApacheDSContainerTests method startWithLdapOverSslWithWrongPassword.
@Test
@DisabledOnOs(OS.WINDOWS)
public void startWithLdapOverSslWithWrongPassword() throws Exception {
final ClassPathResource keyStoreResource = new ClassPathResource("/org/springframework/security/ldap/server/spring.keystore");
final File temporaryKeyStoreFile = new File(this.temporaryFolder, "spring.keystore");
FileCopyUtils.copy(keyStoreResource.getInputStream(), new FileOutputStream(temporaryKeyStoreFile));
assertThat(temporaryKeyStoreFile).isFile();
ApacheDSContainer server = new ApacheDSContainer("dc=springframework,dc=org", "classpath:test-server.ldif");
List<Integer> ports = getDefaultPorts(1);
server.setPort(ports.get(0));
server.setLdapOverSslEnabled(true);
server.setKeyStoreFile(temporaryKeyStoreFile);
server.setCertificatePassord("incorrect-password");
assertThatExceptionOfType(RuntimeException.class).isThrownBy(server::afterPropertiesSet).withMessage("Server startup failed").withRootCauseInstanceOf(UnrecoverableKeyException.class);
}
use of org.junit.jupiter.api.condition.DisabledOnOs in project neo4j by neo4j.
the class DefaultFileSystemAbstractionTest method retrieveFileDescriptor.
@Test
@DisabledOnOs(OS.WINDOWS)
void retrieveFileDescriptor() throws IOException {
Path testFile = testDirectory.file("testFile");
try (StoreChannel storeChannel = fsa.write(testFile)) {
int fileDescriptor = fsa.getFileDescriptor(storeChannel);
assertThat(fileDescriptor).isGreaterThan(0);
}
}
Aggregations