>>>>> Steinar Bang <[email protected]>:
>> A simple workaround is to include your own users.properties in the pax-exam
>> option.
> Thanks! I will look into this.
I tried this:
@Configuration
public Option[] config() {
final MavenArtifactUrlReference authserviceFeatureRepo = maven()
.groupId("no.priv.bang.authservice")
.artifactId("karaf")
.version("LATEST")
.type("xml")
.classifier("features");
File dummyUsersProperties = new
File(getClass().getClassLoader().getResource("dummy.users.properties").getFile());
Option[] options = new Option[] {
features(authserviceFeatureRepo),
replaceConfigurationFile("/etc/users.properties",
dummyUsersProperties)
};
return Stream.of(super.config(),
options).flatMap(Stream::of).toArray(Option[]::new);
}
But the test still fails almost immediately with
org.ops4j.pax.exam.TestContainerException: java.lang.RuntimeException: Config
resource /etc/users.properties not found
I've tried "users.properties" and "etc/users.properties" as the
configurationFilePath argument to replaceConfigurationFile(), but it
didn't make any difference.