use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class K8sNetworkManagerTest method setUp.
@Before
public void setUp() throws Exception {
k8sNetworkStore = new DistributedK8sNetworkStore();
TestUtils.setField(k8sNetworkStore, "coreService", new TestCoreService());
TestUtils.setField(k8sNetworkStore, "storageService", new TestStorageService());
TestUtils.setField(k8sNetworkStore, "eventExecutor", MoreExecutors.newDirectExecutorService());
k8sNetworkStore.activate();
target = new K8sNetworkManager();
TestUtils.setField(target, "coreService", new TestCoreService());
target.k8sNetworkStore = k8sNetworkStore;
target.addListener(testListener);
target.activate();
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class K8sIngressManagerTest method setUp.
@Before
public void setUp() throws Exception {
k8sIngressStore = new DistributedK8sIngressStore();
TestUtils.setField(k8sIngressStore, "coreService", new TestCoreService());
TestUtils.setField(k8sIngressStore, "storageService", new TestStorageService());
TestUtils.setField(k8sIngressStore, "eventExecutor", MoreExecutors.newDirectExecutorService());
k8sIngressStore.activate();
target = new K8sIngressManager();
TestUtils.setField(target, "coreService", new TestCoreService());
target.k8sIngressStore = k8sIngressStore;
target.addListener(testListener);
target.activate();
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class K8sServiceManagerTest method setUp.
@Before
public void setUp() throws Exception {
k8sServiceStore = new DistributedK8sServiceStore();
TestUtils.setField(k8sServiceStore, "coreService", new TestCoreService());
TestUtils.setField(k8sServiceStore, "storageService", new TestStorageService());
TestUtils.setField(k8sServiceStore, "eventExecutor", MoreExecutors.newDirectExecutorService());
k8sServiceStore.activate();
target = new K8sServiceManager();
TestUtils.setField(target, "coreService", new TestCoreService());
target.k8sServiceStore = k8sServiceStore;
target.addListener(testListener);
target.activate();
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class K8sApiConfigManagerTest method setUp.
/**
* Initial setup for this unit test.
*/
@Before
public void setUp() {
apiConfig1 = DefaultK8sApiConfig.builder().clusterName("kubernetes1").segmentId(1).mode(K8sApiConfig.Mode.NORMAL).scheme(K8sApiConfig.Scheme.HTTP).ipAddress(IpAddress.valueOf("10.10.10.2")).port(6443).state(DISCONNECTED).build();
apiConfig2 = DefaultK8sApiConfig.builder().clusterName("kubernetes2").segmentId(2).mode(K8sApiConfig.Mode.NORMAL).scheme(K8sApiConfig.Scheme.HTTPS).ipAddress(IpAddress.valueOf("10.10.10.3")).port(6443).state(DISCONNECTED).token("token").caCertData("caCertData").clientCertData("clientCertData").clientKeyData("clientKeyData").build();
apiConfig3 = DefaultK8sApiConfig.builder().clusterName("kubernetes3").segmentId(3).mode(K8sApiConfig.Mode.PASSTHROUGH).scheme(K8sApiConfig.Scheme.HTTP).ipAddress(IpAddress.valueOf("10.10.10.4")).port(8080).state(DISCONNECTED).build();
configStore = new DistributedK8sApiConfigStore();
TestUtils.setField(configStore, "coreService", new TestCoreService());
TestUtils.setField(configStore, "storageService", new TestStorageService());
TestUtils.setField(configStore, "eventExecutor", MoreExecutors.newDirectExecutorService());
configStore.activate();
configStore.createApiConfig(apiConfig2);
configStore.createApiConfig(apiConfig3);
target = new K8sApiConfigManager();
target.storageService = new TestStorageService();
target.coreService = new TestCoreService();
target.clusterService = new TestClusterService();
target.leadershipService = new TestLeadershipService();
target.configStore = configStore;
target.addListener(testListener);
target.activate();
testListener.events.clear();
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class K8sNodeManagerTest method setUp.
/**
* Initial setup for this unit test.
*/
@Before
public void setUp() {
nodeStore = new DistributedK8sNodeStore();
TestUtils.setField(nodeStore, "coreService", new TestCoreService());
TestUtils.setField(nodeStore, "storageService", new TestStorageService());
TestUtils.setField(nodeStore, "eventExecutor", MoreExecutors.newDirectExecutorService());
nodeStore.activate();
nodeStore.createNode(MINION_2);
nodeStore.createNode(MINION_3);
target = new K8sNodeManager();
target.storageService = new TestStorageService();
target.coreService = new TestCoreService();
target.clusterService = new TestClusterService();
target.leadershipService = new TestLeadershipService();
target.nodeStore = nodeStore;
target.addListener(testListener);
target.activate();
testListener.events.clear();
}
Aggregations