Search in sources :

Example 1 with DefaultLoadBalancerJobValidator

use of com.netflix.titus.api.loadbalancer.model.sanitizer.DefaultLoadBalancerJobValidator in project titus-control-plane by Netflix.

the class DefaultLoadBalancerServiceTest method setUp.

@Before
public void setUp() throws Exception {
    runtime = TitusRuntimes.internal();
    client = mock(LoadBalancerConnector.class);
    loadBalancerStore = new InMemoryLoadBalancerStore();
    reconciler = mock(LoadBalancerReconciler.class);
    reconcilerEvents = PublishSubject.create();
    when(reconciler.events()).thenReturn(reconcilerEvents.toSerialized());
    v3JobOperations = mock(V3JobOperations.class);
    loadBalancerJobOperations = new LoadBalancerJobOperations(v3JobOperations);
    LoadBalancerValidationConfiguration validationConfiguration = LoadBalancerTests.mockValidationConfig(30);
    validator = new DefaultLoadBalancerJobValidator(v3JobOperations, loadBalancerStore, validationConfiguration);
    testScheduler = Schedulers.test();
}
Also used : LoadBalancerValidationConfiguration(com.netflix.titus.api.loadbalancer.model.sanitizer.LoadBalancerValidationConfiguration) LoadBalancerConnector(com.netflix.titus.api.connector.cloud.LoadBalancerConnector) InMemoryLoadBalancerStore(com.netflix.titus.runtime.store.v3.memory.InMemoryLoadBalancerStore) V3JobOperations(com.netflix.titus.api.jobmanager.service.V3JobOperations) DefaultLoadBalancerJobValidator(com.netflix.titus.api.loadbalancer.model.sanitizer.DefaultLoadBalancerJobValidator) Before(org.junit.Before)

Aggregations

LoadBalancerConnector (com.netflix.titus.api.connector.cloud.LoadBalancerConnector)1 V3JobOperations (com.netflix.titus.api.jobmanager.service.V3JobOperations)1 DefaultLoadBalancerJobValidator (com.netflix.titus.api.loadbalancer.model.sanitizer.DefaultLoadBalancerJobValidator)1 LoadBalancerValidationConfiguration (com.netflix.titus.api.loadbalancer.model.sanitizer.LoadBalancerValidationConfiguration)1 InMemoryLoadBalancerStore (com.netflix.titus.runtime.store.v3.memory.InMemoryLoadBalancerStore)1 Before (org.junit.Before)1