use of com.bakdata.conquery.models.config.XodusConfig in project conquery by bakdata.
the class LocalAuthRealmTest method setupAll.
@BeforeAll
public void setupAll() throws Exception {
tmpDir = Files.createTempDirectory(LocalAuthRealmTest.class.getName()).toFile();
assert tmpDir.exists();
conqueryTokenRealm = new ConqueryTokenRealm(storage);
realm = new LocalAuthenticationRealm(Validators.newValidator(), Jackson.BINARY_MAPPER, conqueryTokenRealm, "localtestRealm", tmpDir, new XodusConfig(), Duration.hours(1));
LifecycleUtils.init(realm);
}
use of com.bakdata.conquery.models.config.XodusConfig in project conquery by bakdata.
the class ApiTokenRealmTest method overrideConfig.
@Override
public ConqueryConfig overrideConfig(ConqueryConfig conf, final File workDir) {
XodusStoreFactory storageConfig = (XodusStoreFactory) conf.getStorage();
final Path storageDir = workDir.toPath().resolve(storageConfig.getDirectory().resolve(getClass().getSimpleName()));
return conf.withStorage(storageConfig.withDirectory(storageDir)).withAuthenticationRealms(ImmutableList.<AuthenticationRealmFactory>builder().addAll(conf.getAuthenticationRealms()).add(new ApiTokenRealmFactory(storageDir, new XodusConfig())).build());
}
Aggregations