@BeforeClass public static void setup() throws IOException { conf = CConfiguration.create(); conf.set(Constants.CFG_LOCAL_DATA_DIR, TMP_FOLDER.newFolder().getAbsolutePath()); Injector injector = Guice.createInjector(new ConfigModule(conf), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getNoOpModule()); authEnforcer = injector.getInstance(AuthorizationEnforcer.class); authenticationContext = injector.getInstance(AuthenticationContext.class); }
@Override protected void configure() { bind(AuthorizationContextFactory.class).to(NoOpAuthorizationContextFactory.class); bind(AuthorizerInstantiator.class).in(Scopes.SINGLETON); expose(AuthorizerInstantiator.class); bind(PrivilegesManager.class).to(DelegatingPrivilegeManager.class).in(Scopes.SINGLETON); expose(PrivilegesManager.class); } }
@BeforeClass public static void beforeClass() throws Exception { CConfiguration cConf = CConfiguration.create(); cConf.set(Constants.CFG_LOCAL_DATA_DIR, TEMP_FOLDER.newFolder().getAbsolutePath()); cConf.set(Constants.Security.Store.PROVIDER, "file"); SConfiguration sConf = SConfiguration.create(); sConf.set(Constants.Security.Store.FILE_PASSWORD, "secret"); Injector injector = Guice.createInjector( new ConfigModule(cConf, new Configuration(), sConf), new SecureStoreServerModule(), new AuthorizationTestModule(), new AuthenticationContextModules().getNoOpModule(), new AbstractModule() { @Override protected void configure() { bind(AuthorizationEnforcer.class).to(NoOpAuthorizer.class); bind(NamespaceAdmin.class).to(InMemoryNamespaceAdmin.class).in(Scopes.SINGLETON); bind(NamespaceQueryAdmin.class).to(NamespaceAdmin.class); } } ); injector.getInstance(NamespaceAdmin.class).create(NamespaceMeta.DEFAULT); httpServer = new CommonNettyHttpServiceBuilder(injector.getInstance(CConfiguration.class), "SecureStore") .setHttpHandlers(Collections.singleton(injector.getInstance(SecureStoreHandler.class))) .build(); httpServer.start(); }
@BeforeClass public static void init() throws Exception { cConf = CConfiguration.create(); cConf.set(Constants.CFG_LOCAL_DATA_DIR, tmpFolder.newFolder().getAbsolutePath()); Injector injector = Guice.createInjector( new ConfigModule(cConf), new NonCustomLocationUnitTestModule(), new InMemoryDiscoveryModule(), new DataSetsModules().getStandaloneModules(), new DataFabricLevelDBModule(), new TransactionMetricsModule(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getStandaloneModules(), new AuthenticationContextModules().getMasterModule()); service = injector.getInstance(LevelDBTableService.class); }
@BeforeClass public static void createInjector() throws IOException { CConfiguration cConf = CConfiguration.create(); cConf.set(Constants.CFG_LOCAL_DATA_DIR, TEMP_FOLDER.newFolder().getAbsolutePath()); Injector injector = Guice.createInjector( new ConfigModule(cConf), new DataSetsModules().getInMemoryModules(), new LocalLocationModule(), new TransactionInMemoryModule(), new SystemDatasetRuntimeModule().getInMemoryModules(), new NamespaceAdminTestModule(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getMasterModule() ); TransactionManager txManager = injector.getInstance(TransactionManager.class); txManager.startAndWait(); ownerStore = injector.getInstance(OwnerStore.class); }
@BeforeClass public static void init() throws Exception { CConfiguration conf = CConfiguration.create(); conf.set(Constants.CFG_LOCAL_DATA_DIR, tmpFolder.newFolder().getAbsolutePath()); injector = Guice.createInjector( new ConfigModule(conf), new NonCustomLocationUnitTestModule(), new InMemoryDiscoveryModule(), new DataSetsModules().getStandaloneModules(), new DataFabricLevelDBModule(), new TransactionMetricsModule(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getStandaloneModules(), new AuthenticationContextModules().getMasterModule()); service = injector.getInstance(LevelDBTableService.class); }
new SystemDatasetRuntimeModule().getInMemoryModules(), new TransactionInMemoryModule(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getMasterModule(),
@BeforeClass public static void setup() throws Exception { CConfiguration conf = CConfiguration.create(); conf.set(Constants.CFG_LOCAL_DATA_DIR, tmpFolder.newFolder().getAbsolutePath()); Injector injector = Guice.createInjector( new ConfigModule(conf), new NonCustomLocationUnitTestModule(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getMasterModule(), new InMemoryDiscoveryModule(), new SystemDatasetRuntimeModule().getInMemoryModules(), new DataSetsModules().getInMemoryModules(), new DataFabricLevelDBModule(), new TransactionMetricsModule()); dsFramework = injector.getInstance(DatasetFramework.class); }
@BeforeClass public static void setup() { Injector injector = Guice.createInjector( new ConfigModule(), Modules.override( new DataSetsModules().getInMemoryModules()).with(new AbstractModule() { @Override protected void configure() { // Need the distributed metadata store. bind(MetadataStore.class).to(DefaultMetadataStore.class); } }), new LocalLocationModule(), new TransactionInMemoryModule(), new SystemDatasetRuntimeModule().getInMemoryModules(), new NamespaceAdminTestModule(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getMasterModule() ); txManager = injector.getInstance(TransactionManager.class); txManager.startAndWait(); storage = injector.getInstance(DatasetMetadataStorage.class); }
new ExploreClientModule(), new NamespaceAdminTestModule(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getMasterModule(),
new ConfigModule(cConf, txConf), new InMemoryDiscoveryModule(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getMasterModule(),
new NamespaceAdminTestModule(), new AuthenticationContextModules().getMasterModule(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AbstractModule() {
@BeforeClass public static void setupDefaultStore() { injector = Guice.createInjector( new ConfigModule(), Modules.override( new DataSetsModules().getInMemoryModules()).with(new AbstractModule() { @Override protected void configure() { // Need the distributed metadata store. bind(MetadataStore.class).to(DefaultMetadataStore.class); } }), new LocalLocationModule(), new TransactionInMemoryModule(), new SystemDatasetRuntimeModule().getInMemoryModules(), new NamespaceAdminTestModule(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getMasterModule(), new AuditModule().getInMemoryModules() ); txManager = injector.getInstance(TransactionManager.class); txManager.startAndWait(); AbstractMetadataStoreTest.commonSetup(); }
@BeforeClass public static void setupDefaultStore() { injector = Guice.createInjector( new ConfigModule(), Modules.override( new DataSetsModules().getInMemoryModules()).with(new AbstractModule() { @Override protected void configure() { // Need the distributed metadata store. bind(MetadataStore.class).to(StorageProviderMetadataStore.class); bind(MetadataStorage.class).to(DatasetMetadataStorage.class).in(Scopes.SINGLETON); } }), new LocalLocationModule(), new TransactionInMemoryModule(), new SystemDatasetRuntimeModule().getInMemoryModules(), new NamespaceAdminTestModule(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getMasterModule(), new AuditModule().getInMemoryModules() ); txManager = injector.getInstance(TransactionManager.class); txManager.startAndWait(); AbstractMetadataStoreTest.commonSetup(); }