use of com.netflix.titus.api.loadbalancer.model.sanitizer.LoadBalancerValidationConfiguration 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();
}
use of com.netflix.titus.api.loadbalancer.model.sanitizer.LoadBalancerValidationConfiguration in project titus-control-plane by Netflix.
the class LoadBalancerTests method mockValidationConfig.
static LoadBalancerValidationConfiguration mockValidationConfig(int maxLbsPerJob) {
final LoadBalancerValidationConfiguration config = mock(LoadBalancerValidationConfiguration.class);
when(config.getMaxLoadBalancersPerJob()).thenReturn(maxLbsPerJob);
return config;
}
Aggregations