forked from Netflix/denominator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reverts default zone ttl as it is not supportable across all providers. See Netflix#357
- Loading branch information
Adrian Cole
authored and
Arnaud Dumont
committed
Apr 26, 2015
1 parent
4799e96
commit 7ed83f7
Showing
24 changed files
with
86 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ | |
import denominator.model.Zone; | ||
|
||
import static denominator.assertj.ModelAssertions.assertThat; | ||
import static denominator.clouddns.RackspaceApisTest.domainResponse; | ||
import static denominator.clouddns.RackspaceApisTest.domainsResponse; | ||
|
||
public class CloudDNSZoneApiMockTest { | ||
|
@@ -21,19 +20,15 @@ public class CloudDNSZoneApiMockTest { | |
public void iteratorWhenPresent() throws Exception { | ||
server.enqueueAuthResponse(); | ||
server.enqueue(new MockResponse().setBody(domainsResponse)); | ||
server.enqueue(new MockResponse().setBody(domainResponse)); | ||
|
||
ZoneApi api = server.connect().api().zones(); | ||
|
||
assertThat(api.iterator()).containsExactly( | ||
Zone.builder().name("denominator.io").id("1234").email("[email protected]").ttl(3600) | ||
.build() | ||
Zone.create("denominator.io", "1234", "[email protected]") | ||
); | ||
|
||
server.assertAuthRequest(); | ||
server.assertRequest().hasPath("/v1.0/123123/domains"); | ||
server.assertRequest() | ||
.hasPath("/v1.0/123123/domains/1234?showRecords=false&showSubdomains=false"); | ||
} | ||
|
||
@Test | ||
|
@@ -52,19 +47,15 @@ public void iteratorWhenAbsent() throws Exception { | |
public void iteratorByNameWhenPresent() throws Exception { | ||
server.enqueueAuthResponse(); | ||
server.enqueue(new MockResponse().setBody(domainsResponse)); | ||
server.enqueue(new MockResponse().setBody(domainResponse)); | ||
|
||
ZoneApi api = server.connect().api().zones(); | ||
|
||
assertThat(api.iterateByName("denominator.io")).containsExactly( | ||
Zone.builder().name("denominator.io").id("1234").email("[email protected]").ttl(3600) | ||
.build() | ||
Zone.create("denominator.io", "1234", "[email protected]") | ||
); | ||
|
||
server.assertAuthRequest(); | ||
server.assertRequest().hasPath("/v1.0/123123/domains?name=denominator.io"); | ||
server.assertRequest() | ||
.hasPath("/v1.0/123123/domains/1234?showRecords=false&showSubdomains=false"); | ||
} | ||
|
||
@Test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,8 +80,7 @@ public void domainsByNamePresent() throws Exception { | |
server.enqueue(new MockResponse().setBody(domainsResponse)); | ||
|
||
assertThat(mockApi().domainsByName("denominator.io")).containsExactly( | ||
Zone.builder().name("denominator.io").id("1234").email("[email protected]").ttl(86400) | ||
.build() | ||
Zone.create("denominator.io", "1234", "[email protected]") | ||
); | ||
|
||
server.assertAuthRequest(); | ||
|
@@ -280,9 +279,6 @@ public Credentials get() { | |
static String | ||
domainsResponse = | ||
"{\"domains\":[{\"name\":\"denominator.io\",\"id\":1234,\"accountId\":123123,\"emailAddress\":\"[email protected]\",\"updated\":\"2013-09-02T19:46:56.000+0000\",\"created\":\"2013-09-02T19:45:51.000+0000\"}],\"totalEntries\":1}"; | ||
static String | ||
domainResponse = | ||
"{\"name\":\"denominator.io\",\"id\":1234,\"accountId\":123123,\"ttl\": 3600,\"emailAddress\":\"[email protected]\"}"; | ||
// NOTE records are allowed to be out of order by type | ||
static String | ||
recordsResponse = | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,8 +67,7 @@ public void domainsPresent() throws Exception { | |
server.enqueue(new MockResponse().setBody(domainsResponse)); | ||
|
||
assertThat(mockApi().domains()).containsExactly( | ||
Zone.builder().name("denominator.io.").id(domainId).email("[email protected]").ttl(3600) | ||
.build() | ||
Zone.create("denominator.io.", domainId, "[email protected]") | ||
); | ||
|
||
server.assertAuthRequest(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,8 +25,7 @@ public void iteratorWhenPresent() throws Exception { | |
ZoneApi api = server.connect().api().zones(); | ||
|
||
assertThat(api.iterator()).containsExactly( | ||
Zone.builder().name("denominator.io.").id(domainId).email("[email protected]").ttl(3600) | ||
.build() | ||
Zone.create("denominator.io.", domainId, "[email protected]") | ||
); | ||
|
||
server.assertAuthRequest(); | ||
|
@@ -53,8 +52,7 @@ public void iteratorByNameWhenPresent() throws Exception { | |
ZoneApi api = server.connect().api().zones(); | ||
|
||
assertThat(api.iterateByName("denominator.io.")).containsExactly( | ||
Zone.builder().name("denominator.io.").id(domainId).email("[email protected]").ttl(3600) | ||
.build() | ||
Zone.create("denominator.io.", domainId, "[email protected]") | ||
); | ||
|
||
server.assertAuthRequest(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,8 +28,7 @@ public void iteratorWhenPresent() throws Exception { | |
ZoneApi api = server.connect().api().zones(); | ||
|
||
assertThat(api.iterator()).containsExactly( | ||
Zone.builder().name("denominator.io").id("denominator.io").email("[email protected].") | ||
.ttl(1800).build() | ||
Zone.create("denominator.io", "denominator.io","[email protected].") | ||
); | ||
|
||
server.assertSessionRequest(); | ||
|
@@ -59,8 +58,7 @@ public void iteratorByNameWhenPresent() throws Exception { | |
ZoneApi api = server.connect().api().zones(); | ||
|
||
assertThat(api.iterateByName("denominator.io.")).containsExactly( | ||
Zone.builder().name("denominator.io.").id("denominator.io.").email("[email protected].") | ||
.ttl(1800).build() | ||
Zone.create("denominator.io.", "denominator.io.", "[email protected].") | ||
); | ||
|
||
server.assertSessionRequest(); | ||
|
Oops, something went wrong.