aboutsummaryrefslogtreecommitdiffstats
path: root/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/billing/BillingApiHandlerV2Test.java
diff options
context:
space:
mode:
authorØyvind Grønnesby <oyving@yahooinc.com>2022-06-16 13:40:00 +0200
committerØyvind Grønnesby <oyving@yahooinc.com>2022-06-16 13:40:00 +0200
commit63e868c098fb5a9b56efb7231265a7bc9301f5c5 (patch)
treebe4d0228fdc8749d22469613453c7b0285941d77 /controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/billing/BillingApiHandlerV2Test.java
parent5e00300349d15d4aad0df4ab0631a811df526b79 (diff)
Improve plans in billing API v2
Diffstat (limited to 'controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/billing/BillingApiHandlerV2Test.java')
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/billing/BillingApiHandlerV2Test.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/billing/BillingApiHandlerV2Test.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/billing/BillingApiHandlerV2Test.java
index 69245f0cded..1235dfb33b7 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/billing/BillingApiHandlerV2Test.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/billing/BillingApiHandlerV2Test.java
@@ -70,7 +70,7 @@ public class BillingApiHandlerV2Test extends ControllerContainerCloudTest {
@Test
public void require_tenant_info() {
var request = request("/billing/v2/tenant/" + tenant.value()).roles(tenantReader);
- tester.assertResponse(request, "{\"tenant\":\"tenant1\",\"plan\":\"trial\",\"collection\":\"AUTO\"}");
+ tester.assertResponse(request, "{\"tenant\":\"tenant1\",\"plan\":{\"id\":\"trial\",\"name\":\"Free Trial - for testing purposes\"},\"collection\":\"AUTO\"}");
}
@Test
@@ -136,4 +136,11 @@ public class BillingApiHandlerV2Test extends ControllerContainerCloudTest {
.data("{\"from\": \"2020-05-01\",\"to\": \"2020-06-01\"}");
tester.assertResponse(accountantRequest, "{\"message\":\"Created bill id-123\"}");
}
+
+ @Test
+ public void require_list_of_all_plans() {
+ var accountantRequest = request("/billing/v2/accountant/plans")
+ .roles(Role.hostedAccountant());
+ tester.assertResponse(accountantRequest, "{\"plans\":[{\"id\":\"trial\",\"name\":\"Free Trial - for testing purposes\"},{\"id\":\"paid\",\"name\":\"Paid Plan - for testing purposes\"},{\"id\":\"none\",\"name\":\"None Plan - for testing purposes\"}]}");
+ }
}