Search in sources :

Example 1 with MockRequestHandler

use of com.yahoo.vespa.config.server.rpc.MockRequestHandler in project vespa by vespa-engine.

the class HttpListConfigsHandlerTest method setUp.

@Before
public void setUp() {
    mockRequestHandler = new MockRequestHandler();
    mockRequestHandler.setAllConfigs(new HashSet<ConfigKey<?>>() {

        {
            add(new ConfigKey<>("bar", "conf/id/", "foo"));
        }
    });
    HttpListConfigsHandler.Context ctx = HttpListConfigsHandler.testOnlyContext();
    handler = new HttpListConfigsHandler(ctx, mockRequestHandler);
    namedHandler = new HttpListNamedConfigsHandler(ctx, mockRequestHandler);
}
Also used : MockRequestHandler(com.yahoo.vespa.config.server.rpc.MockRequestHandler) ConfigKey(com.yahoo.vespa.config.ConfigKey) Before(org.junit.Before)

Example 2 with MockRequestHandler

use of com.yahoo.vespa.config.server.rpc.MockRequestHandler in project vespa by vespa-engine.

the class HttpListConfigsHandlerTest method setUp.

@Before
public void setUp() throws Exception {
    mockRequestHandler = new MockRequestHandler();
    mockRequestHandler.setAllConfigs(new HashSet<ConfigKey<?>>() {

        {
            add(new ConfigKey<>("bar", "conf/id", "foo"));
        }
    });
    TestTenantBuilder tb = new TestTenantBuilder();
    tb.createTenant(TenantName.from("mytenant")).withRequestHandler(mockRequestHandler).build();
    Tenants tenants = tb.createTenants();
    handler = new HttpListConfigsHandler(HttpListConfigsHandler.testOnlyContext(), tenants, Zone.defaultZone());
    namedHandler = new HttpListNamedConfigsHandler(HttpListConfigsHandler.testOnlyContext(), tenants, Zone.defaultZone());
}
Also used : MockRequestHandler(com.yahoo.vespa.config.server.rpc.MockRequestHandler) ConfigKey(com.yahoo.vespa.config.ConfigKey) Tenants(com.yahoo.vespa.config.server.tenant.Tenants) Before(org.junit.Before)

Example 3 with MockRequestHandler

use of com.yahoo.vespa.config.server.rpc.MockRequestHandler in project vespa by vespa-engine.

the class HttpGetConfigHandlerTest method setUp.

@Before
public void setUp() throws Exception {
    mockRequestHandler = new MockRequestHandler();
    mockRequestHandler.setAllConfigs(new HashSet<ConfigKey<?>>() {

        {
            add(new ConfigKey<>("bar", "myid", "foo"));
        }
    });
    TestTenantBuilder tb = new TestTenantBuilder();
    tb.createTenant(tenant).withRequestHandler(mockRequestHandler).build();
    Tenants tenants = tb.createTenants();
    handler = new HttpGetConfigHandler(HttpGetConfigHandler.testOnlyContext(), tenants);
}
Also used : MockRequestHandler(com.yahoo.vespa.config.server.rpc.MockRequestHandler) ConfigKey(com.yahoo.vespa.config.ConfigKey) Tenants(com.yahoo.vespa.config.server.tenant.Tenants) Before(org.junit.Before)

Example 4 with MockRequestHandler

use of com.yahoo.vespa.config.server.rpc.MockRequestHandler in project vespa by vespa-engine.

the class HttpGetConfigHandlerTest method setUp.

@Before
public void setUp() {
    mockRequestHandler = new MockRequestHandler();
    mockRequestHandler.setAllConfigs(new HashSet<ConfigKey<?>>() {

        {
            add(new ConfigKey<>("bar", "myid", "foo"));
        }
    });
    handler = new HttpGetConfigHandler(HttpGetConfigHandler.testOnlyContext(), mockRequestHandler);
}
Also used : MockRequestHandler(com.yahoo.vespa.config.server.rpc.MockRequestHandler) ConfigKey(com.yahoo.vespa.config.ConfigKey) Before(org.junit.Before)

Aggregations

ConfigKey (com.yahoo.vespa.config.ConfigKey)4 MockRequestHandler (com.yahoo.vespa.config.server.rpc.MockRequestHandler)4 Before (org.junit.Before)4 Tenants (com.yahoo.vespa.config.server.tenant.Tenants)2