summaryrefslogtreecommitdiff
path: root/test/support
diff options
context:
space:
mode:
authorDiego Alves <diego.oborba@gmail.com>2016-08-19 13:33:50 -0300
committerDiego Alves <diego.oborba@gmail.com>2016-08-19 16:45:51 -0300
commit099b410a51a595dca6ef86468f7b9489ecaa60ef (patch)
treefd70caed1308864436d4852445fa4f4e300fa8e8 /test/support
parentMerge branch 'WIP' into delete_zone (diff)
parentAdd tests to uptade Record (diff)
merge master conflicts
Diffstat (limited to 'test/support')
-rw-r--r--test/support/cassettes/records_manager/update/invalid_record.json31
-rw-r--r--test/support/cassettes/records_manager/update/not_found.json31
-rw-r--r--test/support/cassettes/zones_manager/delete/not_found.json4
-rw-r--r--test/support/cassettes/zones_manager/delete/success.json2
4 files changed, 65 insertions, 3 deletions
diff --git a/test/support/cassettes/records_manager/update/invalid_record.json b/test/support/cassettes/records_manager/update/invalid_record.json
new file mode 100644
index 0000000..df6d73a
--- /dev/null
+++ b/test/support/cassettes/records_manager/update/invalid_record.json
@@ -0,0 +1,31 @@
+[
+ {
+ "request": {
+ "body": "{\"rrsets\":[{\"type\":\"NS\",\"ttl\":86800,\"records\":[{\"disabled\":true,\"content\":\"127.0.0.1\"}],\"name\":\"updated-record.my-domain.art.\",\"changetype\":\"REPLACE\"}]}",
+ "headers": {
+ "X-API-Key": "Locaweb2016"
+ },
+ "method": "patch",
+ "options": [],
+ "request_body": "",
+ "url": "http://cpro36999.systemintegration.locaweb.com.br/api/v1/servers/localhost/zones/my-domain.art."
+ },
+ "response": {
+ "body": "{\"error\": \"Record updated-record.my-domain.art./NS '127.0.0.1': Not in expected format (parsed as '127.0.0.1.')\"}",
+ "headers": {
+ "Access-Control-Allow-Origin": "*",
+ "Connection": "close",
+ "Content-Length": "113",
+ "Content-Security-Policy": "default-src 'self'; style-src 'self' 'unsafe-inline'",
+ "Content-Type": "application/json",
+ "Server": "PowerDNS/4.0.1",
+ "X-Content-Type-Options": "nosniff",
+ "X-Frame-Options": "deny",
+ "X-Permitted-Cross-Domain-Policies": "none",
+ "X-Xss-Protection": "1; mode=block"
+ },
+ "status_code": 422,
+ "type": "ok"
+ }
+ }
+] \ No newline at end of file
diff --git a/test/support/cassettes/records_manager/update/not_found.json b/test/support/cassettes/records_manager/update/not_found.json
new file mode 100644
index 0000000..38edad2
--- /dev/null
+++ b/test/support/cassettes/records_manager/update/not_found.json
@@ -0,0 +1,31 @@
+[
+ {
+ "request": {
+ "body": "{\"rrsets\":[{\"type\":\"A\",\"ttl\":86800,\"records\":[{\"disabled\":true,\"content\":\"127.0.0.1\"}],\"name\":\"updated-record.my-domain.art.\",\"changetype\":\"REPLACE\"}]}",
+ "headers": {
+ "X-API-Key": "Locaweb2016"
+ },
+ "method": "patch",
+ "options": [],
+ "request_body": "",
+ "url": "http://cpro36999.systemintegration.locaweb.com.br/api/v1/servers/localhost/zones/not-canonical-domain.tst"
+ },
+ "response": {
+ "body": "{\"error\": \"Could not find domain 'not-canonical-domain.tst.'\"}",
+ "headers": {
+ "Access-Control-Allow-Origin": "*",
+ "Connection": "close",
+ "Content-Length": "62",
+ "Content-Security-Policy": "default-src 'self'; style-src 'self' 'unsafe-inline'",
+ "Content-Type": "application/json",
+ "Server": "PowerDNS/4.0.1",
+ "X-Content-Type-Options": "nosniff",
+ "X-Frame-Options": "deny",
+ "X-Permitted-Cross-Domain-Policies": "none",
+ "X-Xss-Protection": "1; mode=block"
+ },
+ "status_code": 422,
+ "type": "ok"
+ }
+ }
+] \ No newline at end of file
diff --git a/test/support/cassettes/zones_manager/delete/not_found.json b/test/support/cassettes/zones_manager/delete/not_found.json
index ab1540c..0637299 100644
--- a/test/support/cassettes/zones_manager/delete/not_found.json
+++ b/test/support/cassettes/zones_manager/delete/not_found.json
@@ -8,10 +8,10 @@
"method": "delete",
"options": [],
"request_body": "",
- "url": "http://cpro36999.systemintegration.locaweb.com.br/api/v1/servers/localhost/zones/not_found.com"
+ "url": "http://cpro36999.systemintegration.locaweb.com.br/api/v1/servers/localhost/zones/it-will-never-exist.on.the.art."
},
"response": {
- "body": "{\"error\": \"Could not find domain 'not_found.com.'\"}",
+ "body": "{\"error\": \"Could not find domain 'it-will-never-exist.on.the.art.'\"}",
"headers": {
"Access-Control-Allow-Origin": "*",
"Connection": "close",
diff --git a/test/support/cassettes/zones_manager/delete/success.json b/test/support/cassettes/zones_manager/delete/success.json
index 655ebe7..2f3fe90 100644
--- a/test/support/cassettes/zones_manager/delete/success.json
+++ b/test/support/cassettes/zones_manager/delete/success.json
@@ -8,7 +8,7 @@
"method": "delete",
"options": [],
"request_body": "",
- "url": "http://cpro36999.systemintegration.locaweb.com.br/api/v1/servers/localhost/zones/success-delete.com"
+ "url": "http://cpro36999.systemintegration.locaweb.com.br/api/v1/servers/localhost/zones/my-domain.art."
},
"response": {
"body": "",