diff options
author | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2017-11-20 11:59:39 +0100 |
---|---|---|
committer | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2017-11-20 11:59:39 +0100 |
commit | af300a3d9bb99d9c9f52c8246a7aad7209277707 (patch) | |
tree | 42afd418cebf717e7f3d19cd223fd11bcc234559 /controller-server/src/test | |
parent | 7bac10e56fe6cedcda52885ec29490fa239188f9 (diff) |
Test response cleanup
Diffstat (limited to 'controller-server/src/test')
-rw-r--r-- | controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java | 2 | ||||
-rw-r--r-- | controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/recursive-root.json | 35 | ||||
-rw-r--r-- | controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/recursive-until-tenant-root.json | 47 | ||||
-rw-r--r-- | controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/tenant1-recursive.json (renamed from controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/tenant1.json) | 0 | ||||
-rw-r--r-- | controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/tenant2.json | 19 | ||||
-rw-r--r-- | controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/tenant3.json | 12 |
6 files changed, 38 insertions, 77 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java index 23a50f0c645..d5fb105a5d5 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java @@ -222,7 +222,7 @@ public class ApplicationApiTest extends ControllerContainerTest { tester.assertResponse(request("/application/v4/tenant/tenant1/", GET) .domain("domain1").user("mytenant") .recursive("true"), - new File("tenant1.json")); + new File("tenant1-recursive.json")); // GET at an application, with "&recursive=true", returns full info about its deployments tester.assertResponse(request("/application/v4/tenant/tenant1/application/application1/", GET) .domain("domain1").user("mytenant") diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/recursive-root.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/recursive-root.json index 5126ad8fa69..a4395faede4 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/recursive-root.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/recursive-root.json @@ -1,34 +1,5 @@ [ - { - "tenant": "tenant2", - "type": "ATHENS", - "athensDomain": "domain2", - "property": "property2", - "propertyId": "1234", - "applications": [], - "propertyUrl": "www.properties.tld/1234", - "contactsUrl": "www.contacts.tld/1234", - "issueCreationUrl": "www.issues.tld/1234", - "contacts": [ - [ - "alice" - ], - [ - "bob" - ] - ] - }, - { - "tenant": "tenant3", - "type": "OPSDB", - "property": "property2", - "propertyId": "4321", - "userGroup": "group1", - "applications": [], - "propertyUrl": "www.properties.tld/4321", - "contactsUrl": "www.contacts.tld/4321", - "issueCreationUrl": "www.issues.tld/4321", - "contacts": [] - }, - @include(tenant1.json) + @include(tenant2.json), + @include(tenant3.json), + @include(tenant1-recursive.json) ] diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/recursive-until-tenant-root.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/recursive-until-tenant-root.json index 2b3a5b3122a..35ed8181fac 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/recursive-until-tenant-root.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/recursive-until-tenant-root.json @@ -1,47 +1,6 @@ [ - { - "tenant": "tenant2", - "type": "ATHENS", - "athensDomain": "domain2", - "property": "property2", - "propertyId": "1234", - "applications": [], - "propertyUrl": "www.properties.tld/1234", - "contactsUrl": "www.contacts.tld/1234", - "issueCreationUrl": "www.issues.tld/1234", - "contacts": [ - [ - "alice" - ], - [ - "bob" - ] - ] - }, - { - "tenant": "tenant3", - "type": "OPSDB", - "property": "property2", - "propertyId": "4321", - "userGroup": "group1", - "applications": [], - "propertyUrl": "www.properties.tld/4321", - "contactsUrl": "www.contacts.tld/4321", - "issueCreationUrl": "www.issues.tld/4321", - "contacts": [] - }, - { - "tenant": "tenant1", - "type": "ATHENS", - "athensDomain": "domain1", - "property": "property1", - "applications": [ - { - "application": "application1", - "instance": "default", - "url": "http://localhost:8080/application/v4/tenant/tenant1/application/application1" - } - ] - } + @include(tenant2.json), + @include(tenant3.json), + @include(tenant-with-application.json) ] diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/tenant1.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/tenant1-recursive.json index 9f9d7642867..9f9d7642867 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/tenant1.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/tenant1-recursive.json diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/tenant2.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/tenant2.json new file mode 100644 index 00000000000..6e66202b70d --- /dev/null +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/tenant2.json @@ -0,0 +1,19 @@ +{ + "tenant": "tenant2", + "type": "ATHENS", + "athensDomain": "domain2", + "property": "property2", + "propertyId": "1234", + "applications": [], + "propertyUrl": "www.properties.tld/1234", + "contactsUrl": "www.contacts.tld/1234", + "issueCreationUrl": "www.issues.tld/1234", + "contacts": [ + [ + "alice" + ], + [ + "bob" + ] + ] +}
\ No newline at end of file diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/tenant3.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/tenant3.json new file mode 100644 index 00000000000..fdf3ca490f4 --- /dev/null +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/tenant3.json @@ -0,0 +1,12 @@ +{ + "tenant": "tenant3", + "type": "OPSDB", + "property": "property2", + "propertyId": "4321", + "userGroup": "group1", + "applications": [], + "propertyUrl": "www.properties.tld/4321", + "contactsUrl": "www.contacts.tld/4321", + "issueCreationUrl": "www.issues.tld/4321", + "contacts": [] +}
\ No newline at end of file |