blob: 7cede0d94bc1a7a0148976c5659a87689aa714f9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.config.server.tenant;
import com.yahoo.vespa.config.server.TestComponentRegistry;
import com.yahoo.vespa.config.server.TestWithCurator;
import com.yahoo.vespa.config.server.monitoring.Metrics;
import org.junit.Before;
/**
* Utility for a test using a single default tenant.
*
* @author lulf
* @since 5.35
*/
public class TestWithTenant extends TestWithCurator {
protected Tenants tenants;
protected Tenant tenant;
@Before
public void setupTenant() throws Exception {
final Metrics metrics = Metrics.createTestMetrics();
tenants = new Tenants(new TestComponentRegistry.Builder().curator(curator).metrics(metrics).build(), metrics);
tenant = tenants.defaultTenant();
}
}
|