use of com.yahoo.elide.standalone.config.ElideStandaloneAnalyticSettings in project elide by yahoo.
the class ElideStandaloneDisableAggStoreTest method init.
@Override
@BeforeAll
public void init() throws Exception {
elide = new ElideStandalone(new ElideStandaloneTestSettings() {
@Override
public ElideStandaloneAnalyticSettings getAnalyticProperties() {
ElideStandaloneAnalyticSettings analyticProperties = new ElideStandaloneAnalyticSettings() {
@Override
public boolean enableDynamicModelConfig() {
return true;
}
@Override
public boolean enableAggregationDataStore() {
return false;
}
@Override
public String getDynamicConfigPath() {
return "src/test/resources/configs/";
}
};
return analyticProperties;
}
});
elide.start(false);
}
use of com.yahoo.elide.standalone.config.ElideStandaloneAnalyticSettings in project elide by yahoo.
the class ElideStandaloneDisableMetaDataStoreTest method init.
@BeforeAll
public void init() throws Exception {
elide = new ElideStandalone(new ElideStandaloneTestSettings() {
@Override
public ElideStandaloneAnalyticSettings getAnalyticProperties() {
ElideStandaloneAnalyticSettings analyticProperties = new ElideStandaloneAnalyticSettings() {
@Override
public boolean enableDynamicModelConfig() {
return true;
}
@Override
public boolean enableAggregationDataStore() {
return true;
}
@Override
public boolean enableMetaDataStore() {
return false;
}
@Override
public String getDynamicConfigPath() {
return "src/test/resources/configs/";
}
};
return analyticProperties;
}
});
elide.start(false);
}
use of com.yahoo.elide.standalone.config.ElideStandaloneAnalyticSettings in project elide by yahoo.
the class ElideStandaloneConfigStoreTest method init.
@BeforeAll
public void init() throws Exception {
configRoot = Files.createTempDirectory("test");
settings = new ElideStandaloneTestSettings() {
@Override
public EntityDictionary getEntityDictionary(ServiceLocator injector, ClassScanner scanner, Optional<DynamicConfiguration> dynamicConfiguration, Set<Type<?>> entitiesToExclude) {
Map<String, Class<? extends Check>> checks = new HashMap<>();
if (getAnalyticProperties().enableDynamicModelConfigAPI()) {
checks.put(ConfigChecks.CAN_CREATE_CONFIG, ConfigChecks.CanCreate.class);
checks.put(ConfigChecks.CAN_READ_CONFIG, ConfigChecks.CanRead.class);
checks.put(ConfigChecks.CAN_DELETE_CONFIG, ConfigChecks.CanDelete.class);
checks.put(ConfigChecks.CAN_UPDATE_CONFIG, ConfigChecks.CanNotUpdate.class);
}
EntityDictionary dictionary = new EntityDictionary(// Checks
checks, // Role Checks
new HashMap<>(), new Injector() {
@Override
public void inject(Object entity) {
injector.inject(entity);
}
@Override
public <T> T instantiate(Class<T> cls) {
return injector.create(cls);
}
}, // Serde Lookup
CoerceUtil::lookup, entitiesToExclude, scanner);
dynamicConfiguration.map(DynamicConfiguration::getRoles).orElseGet(Collections::emptySet).forEach(role -> dictionary.addRoleCheck(role, new Role.RoleMemberCheck(role)));
return dictionary;
}
@Override
public ElideStandaloneAnalyticSettings getAnalyticProperties() {
return new ElideStandaloneAnalyticSettings() {
@Override
public boolean enableDynamicModelConfig() {
return true;
}
@Override
public boolean enableDynamicModelConfigAPI() {
return true;
}
@Override
public String getDynamicConfigPath() {
return configRoot.toFile().getAbsolutePath();
}
@Override
public boolean enableAggregationDataStore() {
return true;
}
@Override
public boolean enableMetaDataStore() {
return true;
}
};
}
};
elide = new ElideStandalone(settings);
elide.start(false);
}
use of com.yahoo.elide.standalone.config.ElideStandaloneAnalyticSettings in project elide by yahoo.
the class ElideStandaloneExportTest method init.
@BeforeAll
public void init() throws Exception {
elide = new ElideStandalone(new ElideStandaloneTestSettings() {
@Override
public ElideStandaloneAsyncSettings getAsyncProperties() {
ElideStandaloneAsyncSettings asyncProperties = new ElideStandaloneAsyncSettings() {
@Override
public boolean enabled() {
return true;
}
@Override
public boolean enableCleanup() {
return true;
}
@Override
public Integer getThreadSize() {
return 5;
}
@Override
public Integer getMaxRunTimeSeconds() {
return 1800;
}
@Override
public Integer getQueryCleanupDays() {
return 3;
}
@Override
public boolean enableExport() {
return true;
}
};
return asyncProperties;
}
@Override
public ElideStandaloneAnalyticSettings getAnalyticProperties() {
ElideStandaloneAnalyticSettings analyticProperties = new ElideStandaloneAnalyticSettings() {
@Override
public boolean enableDynamicModelConfig() {
return true;
}
@Override
public boolean enableAggregationDataStore() {
return true;
}
@Override
public boolean enableMetaDataStore() {
return true;
}
@Override
public String getDefaultDialect() {
return SQLDialectFactory.getDefaultDialect().getDialectType();
}
@Override
public String getDynamicConfigPath() {
return "src/test/resources/configs/";
}
};
return analyticProperties;
}
});
elide.start(false);
}
Aggregations