blob: 3c20f6ddb0993dae72d1b90bcd6db7b9323b84c6 (
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
28
29
30
31
32
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.provision.restapi;
import com.yahoo.application.container.handler.Request;
import com.yahoo.config.provision.CloudAccount;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class LoadBalancersV1ApiTest {
private RestApiTester tester;
@Before
public void createTester() {
tester = new RestApiTester(CloudAccount.empty);
}
@After
public void closeTester() {
tester.close();
}
@Test
public void test_load_balancers() throws Exception {
tester.assertFile(new Request("http://localhost:8080/loadbalancers/v1"), "load-balancers.json");
tester.assertFile(new Request("http://localhost:8080/loadbalancers/v1/"), "load-balancers.json");
tester.assertFile(new Request("http://localhost:8080/loadbalancers/v1/?application=tenant4.application4.instance4"), "load-balancers-single.json");
tester.assertResponse(new Request("http://localhost:8080/loadbalancers/v1/?application=tenant.nonexistent.default"), "{\"loadBalancers\":[]}");
}
}
|