use of com.netflix.titus.api.loadbalancer.model.sanitizer.NoOpLoadBalancerJobValidator in project titus-control-plane by Netflix.
the class LoadBalancerTests method getMockLoadBalancerService.
public static LoadBalancerService getMockLoadBalancerService() {
final TitusRuntime runtime = TitusRuntimes.internal();
final LoadBalancerConfiguration loadBalancerConfig = mockConfiguration(5_000);
final LoadBalancerConnector connector = mock(LoadBalancerConnector.class);
final V3JobOperations v3JobOperations = mock(V3JobOperations.class);
when(v3JobOperations.observeJobs()).thenReturn(PublishSubject.create());
final LoadBalancerJobOperations loadBalancerJobOperations = new LoadBalancerJobOperations(v3JobOperations);
final LoadBalancerReconciler reconciler = mock(LoadBalancerReconciler.class);
when(reconciler.events()).thenReturn(PublishSubject.create());
final LoadBalancerStore loadBalancerStore = new InMemoryLoadBalancerStore();
final LoadBalancerJobValidator validator = new NoOpLoadBalancerJobValidator();
final TestScheduler testScheduler = Schedulers.test();
return new DefaultLoadBalancerService(runtime, loadBalancerConfig, connector, loadBalancerStore, loadBalancerJobOperations, reconciler, validator, testScheduler);
}
Aggregations