Add next page navigation for RDAP domain searches

In addition, while adding the tests, I became discontented with the thoroughness of the cursor navigation tests, which checked only the number of items returned, not their proper ordering. So I updated them to be more careful, and backported the changes to the nameserver and entity search tests as well.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179442118
This commit is contained in:
mountford 2017-12-18 10:44:14 -08:00 committed by Ben McIlwain
parent 46aa638b74
commit 42795074a8
8 changed files with 489 additions and 78 deletions

View file

@ -126,6 +126,18 @@
"Search results per query are limited."
]
},
{
"title" : "Navigation Links",
"description" : [ "Links to related pages." ],
"links" :
[
{
"type" : "application/rdap+json",
"rel" : "next",
"href" : "https://example.com/rdap/domains?%NEXT_QUERY%"
}
]
},
{
"title" : "RDAP Terms of Service",
"description" :

View file

@ -127,6 +127,18 @@
"Search results per query are limited."
]
},
{
"title" : "Navigation Links",
"description" : [ "Links to related pages." ],
"links" :
[
{
"type" : "application/rdap+json",
"rel" : "next",
"href" : "https://example.com/rdap/domains?%NEXT_QUERY%"
}
]
},
{
"title" : "RDAP Terms of Service",
"description" :

View file

@ -5,14 +5,14 @@
"objectClassName" : "nameserver",
"handle" : "14-ROID",
"status" : ["active"],
"ldhName" : "ns1.cat.lol",
"ldhName" : "nsx1.cat.lol",
"links" :
[
{
"value" : "https://example.tld/rdap/nameserver/ns1.cat.lol",
"value" : "https://example.tld/rdap/nameserver/nsx1.cat.lol",
"rel" : "self",
"type" : "application/rdap+json",
"href" : "https://example.tld/rdap/nameserver/ns1.cat.lol"
"href" : "https://example.tld/rdap/nameserver/nsx1.cat.lol"
}
],
"ipAddresses" :
@ -33,14 +33,14 @@
"objectClassName" : "nameserver",
"handle" : "15-ROID",
"status" : ["active"],
"ldhName" : "ns2.cat.lol",
"ldhName" : "nsx2.cat.lol",
"links" :
[
{
"value" : "https://example.tld/rdap/nameserver/ns2.cat.lol",
"value" : "https://example.tld/rdap/nameserver/nsx2.cat.lol",
"rel" : "self",
"type" : "application/rdap+json",
"href" : "https://example.tld/rdap/nameserver/ns2.cat.lol"
"href" : "https://example.tld/rdap/nameserver/nsx2.cat.lol"
}
],
"ipAddresses" :
@ -61,14 +61,14 @@
"objectClassName" : "nameserver",
"handle" : "16-ROID",
"status" : ["active"],
"ldhName" : "ns3.cat.lol",
"ldhName" : "nsx3.cat.lol",
"links" :
[
{
"value" : "https://example.tld/rdap/nameserver/ns3.cat.lol",
"value" : "https://example.tld/rdap/nameserver/nsx3.cat.lol",
"rel" : "self",
"type" : "application/rdap+json",
"href" : "https://example.tld/rdap/nameserver/ns3.cat.lol"
"href" : "https://example.tld/rdap/nameserver/nsx3.cat.lol"
}
],
"ipAddresses" :
@ -89,14 +89,14 @@
"objectClassName" : "nameserver",
"handle" : "17-ROID",
"status" : ["active"],
"ldhName" : "ns4.cat.lol",
"ldhName" : "nsx4.cat.lol",
"links" :
[
{
"value" : "https://example.tld/rdap/nameserver/ns4.cat.lol",
"value" : "https://example.tld/rdap/nameserver/nsx4.cat.lol",
"rel" : "self",
"type" : "application/rdap+json",
"href" : "https://example.tld/rdap/nameserver/ns4.cat.lol"
"href" : "https://example.tld/rdap/nameserver/nsx4.cat.lol"
}
],
"ipAddresses" :

View file

@ -5,14 +5,14 @@
"objectClassName" : "nameserver",
"handle" : "14-ROID",
"status" : ["active"],
"ldhName" : "ns1.cat.lol",
"ldhName" : "nsx1.cat.lol",
"links" :
[
{
"value" : "https://example.tld/rdap/nameserver/ns1.cat.lol",
"value" : "https://example.tld/rdap/nameserver/nsx1.cat.lol",
"rel" : "self",
"type" : "application/rdap+json",
"href" : "https://example.tld/rdap/nameserver/ns1.cat.lol"
"href" : "https://example.tld/rdap/nameserver/nsx1.cat.lol"
}
],
"ipAddresses" :
@ -33,14 +33,14 @@
"objectClassName" : "nameserver",
"handle" : "15-ROID",
"status" : ["active"],
"ldhName" : "ns2.cat.lol",
"ldhName" : "nsx2.cat.lol",
"links" :
[
{
"value" : "https://example.tld/rdap/nameserver/ns2.cat.lol",
"value" : "https://example.tld/rdap/nameserver/nsx2.cat.lol",
"rel" : "self",
"type" : "application/rdap+json",
"href" : "https://example.tld/rdap/nameserver/ns2.cat.lol"
"href" : "https://example.tld/rdap/nameserver/nsx2.cat.lol"
}
],
"ipAddresses" :
@ -61,14 +61,14 @@
"objectClassName" : "nameserver",
"handle" : "16-ROID",
"status" : ["active"],
"ldhName" : "ns3.cat.lol",
"ldhName" : "nsx3.cat.lol",
"links" :
[
{
"value" : "https://example.tld/rdap/nameserver/ns3.cat.lol",
"value" : "https://example.tld/rdap/nameserver/nsx3.cat.lol",
"rel" : "self",
"type" : "application/rdap+json",
"href" : "https://example.tld/rdap/nameserver/ns3.cat.lol"
"href" : "https://example.tld/rdap/nameserver/nsx3.cat.lol"
}
],
"ipAddresses" :
@ -89,14 +89,14 @@
"objectClassName" : "nameserver",
"handle" : "17-ROID",
"status" : ["active"],
"ldhName" : "ns4.cat.lol",
"ldhName" : "nsx4.cat.lol",
"links" :
[
{
"value" : "https://example.tld/rdap/nameserver/ns4.cat.lol",
"value" : "https://example.tld/rdap/nameserver/nsx4.cat.lol",
"rel" : "self",
"type" : "application/rdap+json",
"href" : "https://example.tld/rdap/nameserver/ns4.cat.lol"
"href" : "https://example.tld/rdap/nameserver/nsx4.cat.lol"
}
],
"ipAddresses" :