summaryrefslogtreecommitdiffstats
path: root/configserver/src/test/java/com/yahoo/vespa/config/server/application/TenantApplicationsTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'configserver/src/test/java/com/yahoo/vespa/config/server/application/TenantApplicationsTest.java')
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/application/TenantApplicationsTest.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/application/TenantApplicationsTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/application/TenantApplicationsTest.java
index 947308962d4..4543d3b5673 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/application/TenantApplicationsTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/application/TenantApplicationsTest.java
@@ -12,6 +12,7 @@ import com.yahoo.vespa.config.ConfigKey;
import com.yahoo.vespa.config.server.ReloadListener;
import com.yahoo.vespa.config.server.ServerCache;
import com.yahoo.vespa.config.server.TestComponentRegistry;
+import com.yahoo.vespa.config.server.host.HostRegistry;
import com.yahoo.vespa.config.server.model.TestModelFactory;
import com.yahoo.vespa.config.server.modelfactory.ModelFactoryRegistry;
import com.yahoo.vespa.config.server.monitoring.MetricUpdater;
@@ -75,10 +76,11 @@ public class TenantApplicationsTest {
.modelFactoryRegistry(createRegistry())
.reloadListener(listener)
.build();
- TenantRepository tenantRepository = new TenantRepository(componentRegistry);
+ HostRegistry hostRegistry = new HostRegistry();
+ TenantRepository tenantRepository = new TenantRepository(componentRegistry, hostRegistry);
tenantRepository.addTenant(TenantRepository.HOSTED_VESPA_TENANT);
tenantRepository.addTenant(tenantName);
- applications = TenantApplications.create(componentRegistry, tenantName);
+ applications = TenantApplications.create(componentRegistry, hostRegistry, tenantName);
}
@Test
@@ -151,12 +153,12 @@ public class TenantApplicationsTest {
}
@Override
- public void hostsUpdated(TenantName tenant, Collection<String> newHosts) {
- tenantHosts.put(tenant.value(), newHosts);
+ public void hostsUpdated(ApplicationId applicationId, Collection<String> newHosts) {
+ tenantHosts.put(applicationId.tenant().value(), newHosts);
}
@Override
- public void verifyHostsAreAvailable(TenantName tenant, Collection<String> newHosts) {
+ public void verifyHostsAreAvailable(ApplicationId applicationId, Collection<String> newHosts) {
}
@Override
@@ -171,7 +173,7 @@ public class TenantApplicationsTest {
@Test
public void testListConfigs() throws IOException, SAXException {
- applications = TenantApplications.create(componentRegistry, TenantName.defaultName());
+ applications = TenantApplications.create(componentRegistry, new HostRegistry(), TenantName.defaultName());
assertdefaultAppNotFound();
VespaModel model = new VespaModel(FilesApplicationPackage.fromFile(new File("src/test/apps/app")));
@@ -206,7 +208,7 @@ public class TenantApplicationsTest {
}
private TenantApplications createZKAppRepo() {
- return TenantApplications.create(componentRegistry, tenantName);
+ return TenantApplications.create(componentRegistry, new HostRegistry(), tenantName);
}
private static ApplicationId createApplicationId(String name) {