use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class DistributedTelemetryConfigStoreTest method setUp.
/**
* Sets up the telemetry config store and the storage service test harness.
*/
@Before
public void setUp() {
configStore = new DistributedTelemetryConfigStore();
configStore.storageService = new TestStorageService();
configStore.coreService = new TestCoreService();
configStore.setDelegate(event -> {
});
configStore.activate();
initTelemetryConfigs();
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class OpenstackVtapManagerTest method setUp.
@Before
public void setUp() {
store = new DistributedOpenstackVtapStore();
TestUtils.setField(store, "storageService", new TestStorageService());
store.activate();
store.createVtap(VTAP_2);
target = new OpenstackVtapManager();
target.coreService = new TestCoreService();
target.clusterService = new TestClusterService();
target.leadershipService = new TestLeadershipService();
target.flowRuleService = new TestFlowRuleService();
target.groupService = new TestGroupService();
target.deviceService = new TestDeviceService();
target.osNodeService = new TestOpenstackNodeService();
target.hostService = new TestHostService();
target.componentConfigService = new TestComponentConfigService();
target.store = store;
injectEventDispatcher(target, new TestEventDispatcher());
target.addListener(testListener);
testListener.events.clear();
target.activate();
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class OpenstackVtapStoreTest method setup.
@Before
public void setup() {
store = new DistributedOpenstackVtapStore();
TestUtils.setField(store, "storageService", new TestStorageService());
store.activate();
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class CfmMdManagerTest method setup.
@Before
public void setup() throws Exception, CfmConfigException {
mdStore = new DistributedMdStore();
MaintenanceAssociation maTest11 = DefaultMaintenanceAssociation.builder(MA_ID_1_1, MD_ID_1.getNameLength()).ccmInterval(MaintenanceAssociation.CcmInterval.INTERVAL_10MIN).maNumericId((short) 1).addToRemoteMepIdList(MepId.valueOf((short) 101)).addToRemoteMepIdList(MepId.valueOf((short) 102)).addToComponentList(DefaultComponent.builder(1).tagType(Component.TagType.VLAN_CTAG).build()).build();
MaintenanceAssociation maTest12 = DefaultMaintenanceAssociation.builder(MA_ID_1_2, MD_ID_1.getNameLength()).ccmInterval(MaintenanceAssociation.CcmInterval.INTERVAL_10MIN).maNumericId((short) 2).addToRemoteMepIdList(MepId.valueOf((short) 201)).addToRemoteMepIdList(MepId.valueOf((short) 202)).addToComponentList(DefaultComponent.builder(2).tagType(Component.TagType.VLAN_CTAG).build()).build();
MaintenanceDomain mdTest1 = DefaultMaintenanceDomain.builder(MD_ID_1).mdLevel(MaintenanceDomain.MdLevel.LEVEL1).mdNumericId((short) 1).addToMaList(maTest11).addToMaList(maTest12).build();
TestUtils.setField(mdStore, "storageService", new TestStorageService());
TestUtils.setField(mdStore, "clusterService", new CfmMdManagerTest.TestClusterService());
TestUtils.setField(mdStore, "mastershipService", new CfmMdManagerTest.TestMastershipService());
mdStore.activate();
mdStore.createUpdateMaintenanceDomain(mdTest1);
manager = new CfmMdManager();
manager.store = mdStore;
service = manager;
TestUtils.setField(manager, "storageService", new TestStorageService());
TestUtils.setField(manager, "coreService", new TestCoreService());
TestUtils.setField(manager, "mepService", mepService);
injectEventDispatcher(manager, new TestEventDispatcher());
manager.appId = new CfmMdManagerTest.TestApplicationId(0, "CfmMdManagerTest");
manager.activate();
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class AlarmManagerTest method setUp.
@Before
public void setUp() throws Exception {
alarmStore = new DistributedAlarmStore();
TestUtils.setField(alarmStore, "storageService", new TestStorageService());
alarmStore.activate();
manager = new AlarmManager();
registry = manager;
manager.addListener(listener);
NetTestTools.injectEventDispatcher(manager, new TestEventDispatcher());
manager.deviceService = deviceService;
manager.mastershipService = mastershipService;
manager.store = alarmStore;
manager.activate();
provider = new TestProvider();
providerService = registry.register(provider);
}
Aggregations