From ff3d446681eef6c8bae5dd68e5c3531f582122ea Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Thu, 13 Dec 2018 11:46:43 -0500 Subject: [PATCH] Codestyle: Fix formatting on parse_test JSON (#427) * Fix failing parse_test 021 * Fix JSON formatting in parse_test directory * js_test.go now reports json content length --- pkg/js/js_test.go | 10 ++- pkg/js/parse_tests/001-basic.json | 58 ++++++------- pkg/js/parse_tests/002-ttl.json | 60 ++++++------- pkg/js/parse_tests/003-meta.json | 50 +++++------ pkg/js/parse_tests/004-ips.json | 66 +++++++++------ pkg/js/parse_tests/006-transforms.json | 64 +++++++------- .../parse_tests/007-importTransformTTL.json | 42 +++++----- pkg/js/parse_tests/008-import.json | 34 ++++---- pkg/js/parse_tests/009-reverse.json | 22 ++--- pkg/js/parse_tests/010-alias.json | 34 ++++---- pkg/js/parse_tests/011-cfRedirect.json | 44 +++++----- pkg/js/parse_tests/012-duration.json | 84 +++++++++---------- pkg/js/parse_tests/013-mx.json | 38 ++++----- pkg/js/parse_tests/014-caa.json | 62 +++++++------- pkg/js/parse_tests/015-tlsa.json | 31 ++++--- pkg/js/parse_tests/016-backslash.json | 34 ++++---- pkg/js/parse_tests/017-txt.json | 37 +++++--- pkg/js/parse_tests/018-dkim.json | 17 ++-- pkg/js/parse_tests/019-ignored-records.json | 15 ++-- pkg/js/parse_tests/019-r53-alias.json | 84 +++++++++---------- pkg/js/parse_tests/020-nameserver-ttl.json | 16 ++-- 21 files changed, 464 insertions(+), 438 deletions(-) diff --git a/pkg/js/js_test.go b/pkg/js/js_test.go index 5d9eb2ca9..b9730783c 100644 --- a/pkg/js/js_test.go +++ b/pkg/js/js_test.go @@ -60,10 +60,12 @@ func TestParsedFiles(t *testing.T) { if err != nil { t.Fatal(err) } - if string(expectedJSON) != string(actualJSON) { - t.Error("Expected and actual json don't match") - t.Log("Expected:", string(expectedJSON)) - t.Log("Actual :", string(actualJSON)) + es := string(expectedJSON) + as := string(actualJSON) + if es != as { + t.Errorf("Expected and actual json don't match: %s", f.Name()) + t.Logf("Expected(%v): %s", len(es), es) + t.Logf("Actual (%v): %s", len(as), as) } }) } diff --git a/pkg/js/parse_tests/001-basic.json b/pkg/js/parse_tests/001-basic.json index defca9e0c..2c51187e4 100644 --- a/pkg/js/parse_tests/001-basic.json +++ b/pkg/js/parse_tests/001-basic.json @@ -1,30 +1,30 @@ { - "registrars": [ - { - "name": "Third-Party", - "type": "NONE" - } - ], - "dns_providers": [ - { - "name": "Cloudflare", - "type": "CLOUDFLAREAPI" - } - ], - "domains": [ - { - "name": "foo.com", - "registrar": "Third-Party", - "dnsProviders": { - "Cloudflare":-1 - }, - "records": [ - { - "type": "A", - "name": "@", - "target": "1.2.3.4" - } - ] - } - ] - } \ No newline at end of file + "dns_providers": [ + { + "name": "Cloudflare", + "type": "CLOUDFLAREAPI" + } + ], + "domains": [ + { + "dnsProviders": { + "Cloudflare": -1 + }, + "name": "foo.com", + "records": [ + { + "name": "@", + "target": "1.2.3.4", + "type": "A" + } + ], + "registrar": "Third-Party" + } + ], + "registrars": [ + { + "name": "Third-Party", + "type": "NONE" + } + ] +} diff --git a/pkg/js/parse_tests/002-ttl.json b/pkg/js/parse_tests/002-ttl.json index 7097f3dc4..9345073c2 100644 --- a/pkg/js/parse_tests/002-ttl.json +++ b/pkg/js/parse_tests/002-ttl.json @@ -1,31 +1,31 @@ { - "registrars": [ - { - "name": "Third-Party", - "type": "NONE" - } - ], - "dns_providers": [ - { - "name": "Cloudflare", - "type": "CLOUDFLAREAPI" - } - ], - "domains": [ - { - "name": "foo.com", - "registrar": "Third-Party", - "dnsProviders": { - "Cloudflare":-1 - }, - "records": [ - { - "type": "A", - "name": "@", - "target": "1.2.3.4", - "ttl": 42 - } - ] - } - ] - } \ No newline at end of file + "dns_providers": [ + { + "name": "Cloudflare", + "type": "CLOUDFLAREAPI" + } + ], + "domains": [ + { + "dnsProviders": { + "Cloudflare": -1 + }, + "name": "foo.com", + "records": [ + { + "name": "@", + "target": "1.2.3.4", + "ttl": 42, + "type": "A" + } + ], + "registrar": "Third-Party" + } + ], + "registrars": [ + { + "name": "Third-Party", + "type": "NONE" + } + ] +} diff --git a/pkg/js/parse_tests/003-meta.json b/pkg/js/parse_tests/003-meta.json index 38c39d30d..19d058f6a 100644 --- a/pkg/js/parse_tests/003-meta.json +++ b/pkg/js/parse_tests/003-meta.json @@ -1,26 +1,26 @@ { - "registrars": [ - { - "name": "Cloudflare", - "type": "CLOUDFLAREAPI" - } - ], - "dns_providers": [], - "domains": [ - { - "name": "foo.com", - "registrar": "Cloudflare", - "dnsProviders": {}, - "records": [ - { - "type": "A", - "name": "@", - "target": "1.2.3.4", - "meta": { - "cloudflare_proxy": "ON" - } - } - ] - } - ] - } \ No newline at end of file + "dns_providers": [], + "domains": [ + { + "dnsProviders": {}, + "name": "foo.com", + "records": [ + { + "meta": { + "cloudflare_proxy": "ON" + }, + "name": "@", + "target": "1.2.3.4", + "type": "A" + } + ], + "registrar": "Cloudflare" + } + ], + "registrars": [ + { + "name": "Cloudflare", + "type": "CLOUDFLAREAPI" + } + ] +} diff --git a/pkg/js/parse_tests/004-ips.json b/pkg/js/parse_tests/004-ips.json index 33513f76a..edfb91364 100644 --- a/pkg/js/parse_tests/004-ips.json +++ b/pkg/js/parse_tests/004-ips.json @@ -1,28 +1,40 @@ { - "registrars": [ - { - "name": "Third-Party", - "type": "NONE" - } - ], - "dns_providers": [ - { - "name": "Cloudflare", - "type": "CLOUDFLAREAPI" - } - ], - "domains": [ - { - "name": "foo.com", - "registrar": "Third-Party", - "dnsProviders": { - "Cloudflare":0 - }, - "records": [ - { "type": "A","name": "@","target": "1.2.3.4"}, - { "type": "A","name": "p1","target": "1.2.3.5"}, - { "type": "A","name": "p255","target": "1.2.4.3"} - ] - } - ] - } \ No newline at end of file + "dns_providers": [ + { + "name": "Cloudflare", + "type": "CLOUDFLAREAPI" + } + ], + "domains": [ + { + "dnsProviders": { + "Cloudflare": 0 + }, + "name": "foo.com", + "records": [ + { + "name": "@", + "target": "1.2.3.4", + "type": "A" + }, + { + "name": "p1", + "target": "1.2.3.5", + "type": "A" + }, + { + "name": "p255", + "target": "1.2.4.3", + "type": "A" + } + ], + "registrar": "Third-Party" + } + ], + "registrars": [ + { + "name": "Third-Party", + "type": "NONE" + } + ] +} diff --git a/pkg/js/parse_tests/006-transforms.json b/pkg/js/parse_tests/006-transforms.json index aa3cd7aaa..324ef94d6 100644 --- a/pkg/js/parse_tests/006-transforms.json +++ b/pkg/js/parse_tests/006-transforms.json @@ -1,33 +1,33 @@ { - "registrars": [ - { - "name": "Third-Party", - "type": "NONE" - } - ], - "dns_providers": [ - { - "name": "Cloudflare", - "type": "CLOUDFLAREAPI" - } - ], - "domains": [ - { - "name": "foo.com", - "registrar": "Third-Party", - "dnsProviders": { - "Cloudflare":-1 - }, - "records": [ - { - "type": "A", - "name": "@", - "target": "1.2.3.4", - "meta": { - "transform": "0.0.0.0 ~ 1.1.1.1 ~ 2.2.2.2 ~ ; 1.1.1.1 ~ 2.2.2.2 ~ 3.3.3.3,4.4.4.4,5.5.5.5 ~ ; 1.1.1.1 ~ 2.2.2.2 ~ ~ 3.3.3.3,4.4.4.4,5.5.5.5" - } - } - ] - } - ] - } \ No newline at end of file + "dns_providers": [ + { + "name": "Cloudflare", + "type": "CLOUDFLAREAPI" + } + ], + "domains": [ + { + "dnsProviders": { + "Cloudflare": -1 + }, + "name": "foo.com", + "records": [ + { + "meta": { + "transform": "0.0.0.0 ~ 1.1.1.1 ~ 2.2.2.2 ~ ; 1.1.1.1 ~ 2.2.2.2 ~ 3.3.3.3,4.4.4.4,5.5.5.5 ~ ; 1.1.1.1 ~ 2.2.2.2 ~ ~ 3.3.3.3,4.4.4.4,5.5.5.5" + }, + "name": "@", + "target": "1.2.3.4", + "type": "A" + } + ], + "registrar": "Third-Party" + } + ], + "registrars": [ + { + "name": "Third-Party", + "type": "NONE" + } + ] +} diff --git a/pkg/js/parse_tests/007-importTransformTTL.json b/pkg/js/parse_tests/007-importTransformTTL.json index c28b1ec92..6023f00ce 100644 --- a/pkg/js/parse_tests/007-importTransformTTL.json +++ b/pkg/js/parse_tests/007-importTransformTTL.json @@ -1,22 +1,22 @@ { - "registrars": [], - "dns_providers": [], - "domains": [ - { - "name": "foo.com", - "registrar": "reg", - "dnsProviders": {}, - "records": [ - { - "type": "IMPORT_TRANSFORM", - "name": "@", - "target": "foo2.com", - "ttl": 60, - "meta": { - "transform_table": "0.0.0.0 ~ 1.1.1.1 ~ 2.2.2.2 ~ " - } - } - ] - } - ] - } + "dns_providers": [], + "domains": [ + { + "dnsProviders": {}, + "name": "foo.com", + "records": [ + { + "meta": { + "transform_table": "0.0.0.0 ~ 1.1.1.1 ~ 2.2.2.2 ~ " + }, + "name": "@", + "target": "foo2.com", + "ttl": 60, + "type": "IMPORT_TRANSFORM" + } + ], + "registrar": "reg" + } + ], + "registrars": [] +} diff --git a/pkg/js/parse_tests/008-import.json b/pkg/js/parse_tests/008-import.json index 04a91c1ac..b1b4fb02f 100644 --- a/pkg/js/parse_tests/008-import.json +++ b/pkg/js/parse_tests/008-import.json @@ -1,18 +1,18 @@ { - "registrars": [], - "dns_providers": [], - "domains": [ - { - "name": "foo.com", - "registrar": "none", - "dnsProviders": {}, - "records": [ - { - "type": "A", - "name": "@", - "target": "1.2.3.4" - } - ] - } - ] - } \ No newline at end of file + "dns_providers": [], + "domains": [ + { + "dnsProviders": {}, + "name": "foo.com", + "records": [ + { + "name": "@", + "target": "1.2.3.4", + "type": "A" + } + ], + "registrar": "none" + } + ], + "registrars": [] +} diff --git a/pkg/js/parse_tests/009-reverse.json b/pkg/js/parse_tests/009-reverse.json index f4bf5a87c..f1b895339 100644 --- a/pkg/js/parse_tests/009-reverse.json +++ b/pkg/js/parse_tests/009-reverse.json @@ -1,12 +1,12 @@ { - "registrars": [], - "dns_providers": [], - "domains": [ - { - "name": "2.1.in-addr.arpa", - "registrar": "none", - "dnsProviders": {}, - "records": [] - } - ] - } \ No newline at end of file + "dns_providers": [], + "domains": [ + { + "dnsProviders": {}, + "name": "2.1.in-addr.arpa", + "records": [], + "registrar": "none" + } + ], + "registrars": [] +} diff --git a/pkg/js/parse_tests/010-alias.json b/pkg/js/parse_tests/010-alias.json index fc59bed03..c4985bfe0 100644 --- a/pkg/js/parse_tests/010-alias.json +++ b/pkg/js/parse_tests/010-alias.json @@ -1,18 +1,18 @@ { - "registrars": [], - "dns_providers": [], - "domains": [ - { - "name": "foo.com", - "registrar": "none", - "dnsProviders": {}, - "records": [ - { - "type": "ALIAS", - "name": "@", - "target": "foo.com." - } - ] - } - ] - } \ No newline at end of file + "dns_providers": [], + "domains": [ + { + "dnsProviders": {}, + "name": "foo.com", + "records": [ + { + "name": "@", + "target": "foo.com.", + "type": "ALIAS" + } + ], + "registrar": "none" + } + ], + "registrars": [] +} diff --git a/pkg/js/parse_tests/011-cfRedirect.json b/pkg/js/parse_tests/011-cfRedirect.json index bf424d463..b36005369 100644 --- a/pkg/js/parse_tests/011-cfRedirect.json +++ b/pkg/js/parse_tests/011-cfRedirect.json @@ -1,23 +1,23 @@ { - "registrars": [], - "dns_providers": [], - "domains": [ - { - "name": "foo.com", - "registrar": "none", - "dnsProviders": {}, - "records": [ - { - "type": "CF_REDIRECT", - "name": "@", - "target": "test.foo.com,https://goo.com/$1" - }, - { - "type": "CF_TEMP_REDIRECT", - "name": "@", - "target": "test.foo.com,https://goo.com/$1" - } - ] - } - ] - } \ No newline at end of file + "dns_providers": [], + "domains": [ + { + "dnsProviders": {}, + "name": "foo.com", + "records": [ + { + "name": "@", + "target": "test.foo.com,https://goo.com/$1", + "type": "CF_REDIRECT" + }, + { + "name": "@", + "target": "test.foo.com,https://goo.com/$1", + "type": "CF_TEMP_REDIRECT" + } + ], + "registrar": "none" + } + ], + "registrars": [] +} diff --git a/pkg/js/parse_tests/012-duration.json b/pkg/js/parse_tests/012-duration.json index 30bd54e33..84c10d940 100644 --- a/pkg/js/parse_tests/012-duration.json +++ b/pkg/js/parse_tests/012-duration.json @@ -1,43 +1,43 @@ { - "registrars": [], - "dns_providers": [], - "domains": [ - { - "name": "foo.com", - "registrar": "none", - "dnsProviders": {}, - "records": [ - { - "type": "A", - "name": "@", - "target": "1.2.3.4", - "ttl":300 - }, - { - "type": "A", - "name": "@", - "target": "1.2.3.4", - "ttl":300 - }, - { - "type": "A", - "name": "@", - "target": "1.2.3.4", - "ttl":180 - }, - { - "type": "A", - "name": "@", - "target": "1.2.3.4", - "ttl":10800 - }, - { - "type": "A", - "name": "@", - "target": "1.2.3.4", - "ttl":259200 - } - ] - } - ] - } \ No newline at end of file + "dns_providers": [], + "domains": [ + { + "dnsProviders": {}, + "name": "foo.com", + "records": [ + { + "name": "@", + "target": "1.2.3.4", + "ttl": 300, + "type": "A" + }, + { + "name": "@", + "target": "1.2.3.4", + "ttl": 300, + "type": "A" + }, + { + "name": "@", + "target": "1.2.3.4", + "ttl": 180, + "type": "A" + }, + { + "name": "@", + "target": "1.2.3.4", + "ttl": 10800, + "type": "A" + }, + { + "name": "@", + "target": "1.2.3.4", + "ttl": 259200, + "type": "A" + } + ], + "registrar": "none" + } + ], + "registrars": [] +} diff --git a/pkg/js/parse_tests/013-mx.json b/pkg/js/parse_tests/013-mx.json index e96d45b02..d1476069c 100644 --- a/pkg/js/parse_tests/013-mx.json +++ b/pkg/js/parse_tests/013-mx.json @@ -1,19 +1,19 @@ -{ - "registrars": [], - "dns_providers": [], - "domains": [ - { - "name": "foo.com", - "registrar": "none", - "dnsProviders": {}, - "records": [ - { - "type": "MX", - "name": "@", - "target": "foo.com.", - "mxpreference": 15 - } - ] - } - ] -} \ No newline at end of file +{ + "dns_providers": [], + "domains": [ + { + "dnsProviders": {}, + "name": "foo.com", + "records": [ + { + "mxpreference": 15, + "name": "@", + "target": "foo.com.", + "type": "MX" + } + ], + "registrar": "none" + } + ], + "registrars": [] +} diff --git a/pkg/js/parse_tests/014-caa.json b/pkg/js/parse_tests/014-caa.json index 98c66ba95..bc6bc125d 100644 --- a/pkg/js/parse_tests/014-caa.json +++ b/pkg/js/parse_tests/014-caa.json @@ -1,45 +1,45 @@ { - "registrars":[], - "dns_providers":[], - "domains":[ + "dns_providers": [], + "domains": [ { - "name":"foo.com", - "registrar":"none", - "dnsProviders":{}, - "records":[ + "dnsProviders": {}, + "name": "foo.com", + "records": [ { - "type":"CAA", - "name":"@", - "target":"letsencrypt.org", - "caatag":"issue" + "caatag": "issue", + "name": "@", + "target": "letsencrypt.org", + "type": "CAA" }, { - "type":"CAA", - "name":"@", - "target":";", - "caatag":"issuewild" + "caatag": "issuewild", + "name": "@", + "target": ";", + "type": "CAA" }, { - "type":"CAA", - "name":"@", - "target":"mailto:test@example.com", - "caatag":"iodef", - "caaflag":128 + "caaflag": 128, + "caatag": "iodef", + "name": "@", + "target": "mailto:test@example.com", + "type": "CAA" }, { - "type":"CAA", - "name":"@", - "target":"http://example.com", - "caatag":"iodef" + "caatag": "iodef", + "name": "@", + "target": "http://example.com", + "type": "CAA" }, { - "type":"CAA", - "name":"@", - "target":"https://example.com", - "caatag":"iodef", - "caaflag":128 + "caaflag": 128, + "caatag": "iodef", + "name": "@", + "target": "https://example.com", + "type": "CAA" } - ] + ], + "registrar": "none" } - ] + ], + "registrars": [] } diff --git a/pkg/js/parse_tests/015-tlsa.json b/pkg/js/parse_tests/015-tlsa.json index 03f1a5e75..0306453af 100644 --- a/pkg/js/parse_tests/015-tlsa.json +++ b/pkg/js/parse_tests/015-tlsa.json @@ -1,22 +1,21 @@ { - "registrars":[], - "dns_providers":[], - "domains":[ + "dns_providers": [], + "domains": [ { - "name":"foo.com", - "registrar":"none", - "dnsProviders":{}, - "records":[ + "dnsProviders": {}, + "name": "foo.com", + "records": [ { - "type":"TLSA", - "name":"_443._tcp", - "target":"MDFiYTQ3MTljODBiNmZlOTExYjA5MWE3YzA1MTI0YjY0ZWVlY2U5NjRlMDljMDU4ZWY4Zjk4MDVkYWNhNTQ2YiAgLQo=", - "tlsausage":3, - "tlsaselector":1, - "tlsamatchingtype":1 + "name": "_443._tcp", + "target": "MDFiYTQ3MTljODBiNmZlOTExYjA5MWE3YzA1MTI0YjY0ZWVlY2U5NjRlMDljMDU4ZWY4Zjk4MDVkYWNhNTQ2YiAgLQo=", + "tlsamatchingtype": 1, + "tlsaselector": 1, + "tlsausage": 3, + "type": "TLSA" } - ] + ], + "registrar": "none" } - ] + ], + "registrars": [] } - diff --git a/pkg/js/parse_tests/016-backslash.json b/pkg/js/parse_tests/016-backslash.json index e32999721..82cc3f951 100644 --- a/pkg/js/parse_tests/016-backslash.json +++ b/pkg/js/parse_tests/016-backslash.json @@ -1,20 +1,22 @@ { - "registrars": [], - "dns_providers": [], - "domains": [ + "dns_providers": [], + "domains": [ + { + "dnsProviders": {}, + "name": "foo.com", + "records": [ { - "name": "foo.com", - "registrar": "none", - "dnsProviders": {}, - "records": [ - { - "type": "TXT", - "name": "_dmarc", - "target": "v=DMARC1\\; p=reject\\; sp=reject\\; pct=100\\; rua=mailto:xx...@yyyy.com\\; ruf=mailto:xx...@yyyy.com\\; fo=1", - "ttl": 300, - "txtstrings":["v=DMARC1\\; p=reject\\; sp=reject\\; pct=100\\; rua=mailto:xx...@yyyy.com\\; ruf=mailto:xx...@yyyy.com\\; fo=1"] - } - ] + "name": "_dmarc", + "target": "v=DMARC1\\; p=reject\\; sp=reject\\; pct=100\\; rua=mailto:xx...@yyyy.com\\; ruf=mailto:xx...@yyyy.com\\; fo=1", + "ttl": 300, + "txtstrings": [ + "v=DMARC1\\; p=reject\\; sp=reject\\; pct=100\\; rua=mailto:xx...@yyyy.com\\; ruf=mailto:xx...@yyyy.com\\; fo=1" + ], + "type": "TXT" } - ] + ], + "registrar": "none" + } + ], + "registrars": [] } diff --git a/pkg/js/parse_tests/017-txt.json b/pkg/js/parse_tests/017-txt.json index e6c9e3fbd..70620f5e9 100644 --- a/pkg/js/parse_tests/017-txt.json +++ b/pkg/js/parse_tests/017-txt.json @@ -1,37 +1,48 @@ { - "registrars": [], "dns_providers": [], "domains": [ { - "name": "foo.com", - "registrar": "none", "dnsProviders": {}, + "name": "foo.com", "records": [ { - "type": "TXT", "name": "@", "target": "simple", - "txtstrings": [ "simple" ] + "txtstrings": [ + "simple" + ], + "type": "TXT" }, { - "type": "TXT", "name": "@", "target": "one", - "txtstrings": [ "one" ] + "txtstrings": [ + "one" + ], + "type": "TXT" }, { - "type": "TXT", "name": "@", "target": "bonie", - "txtstrings": [ "bonie", "clyde" ] + "txtstrings": [ + "bonie", + "clyde" + ], + "type": "TXT" }, { - "type": "TXT", "name": "@", "target": "straw", - "txtstrings": [ "straw", "wood", "brick" ] + "txtstrings": [ + "straw", + "wood", + "brick" + ], + "type": "TXT" } - ] + ], + "registrar": "none" } - ] + ], + "registrars": [] } diff --git a/pkg/js/parse_tests/018-dkim.json b/pkg/js/parse_tests/018-dkim.json index d5ad6852c..c1bad95ed 100644 --- a/pkg/js/parse_tests/018-dkim.json +++ b/pkg/js/parse_tests/018-dkim.json @@ -1,21 +1,22 @@ { - "registrars": [], "dns_providers": [], "domains": [ { - "name": "foo.com", - "registrar": "none", "dnsProviders": {}, + "name": "foo.com", "records": [ { - "type": "TXT", "name": "dkimtest2", "target": "this string is 255 bytes long.hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnKZogtjOlHoeY8iZ5o5brlPOsj/a2Q9Bopu1kHxlxrdw7tZVL9FzUMngiIYGrl8dbP7Rvk7TLMoxHxVkRZPBtIpsKIab/gOUoPLQVYbrAmzyguHYBwAApi3H/pvjUsK8+XF0dKY17AR96lokAPqvfBaUb+DSx8zNw2hrYWYVqvCtnxHUGEUhT1bTlEZBptH3j", - "txtstrings": ["this string is 255 bytes long.hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnKZogtjOlHoeY8iZ5o5brlPOsj/a2Q9Bopu1kHxlxrdw7tZVL9FzUMngiIYGrl8dbP7Rvk7TLMoxHxVkRZPBtIpsKIab/gOUoPLQVYbrAmzyguHYBwAApi3H/pvjUsK8+XF0dKY17AR96lokAPqvfBaUb+DSx8zNw2hrYWYVqvCtnxHUGEUhT1bTlEZBptH3j", + "txtstrings": [ + "this string is 255 bytes long.hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnKZogtjOlHoeY8iZ5o5brlPOsj/a2Q9Bopu1kHxlxrdw7tZVL9FzUMngiIYGrl8dbP7Rvk7TLMoxHxVkRZPBtIpsKIab/gOUoPLQVYbrAmzyguHYBwAApi3H/pvjUsK8+XF0dKY17AR96lokAPqvfBaUb+DSx8zNw2hrYWYVqvCtnxHUGEUhT1bTlEZBptH3j", "this is the remainder. it is 156 bytes long.mOhl2JmbsFKy+RoMTwbkk0/meRvcEFWLHkr4MSgbnie6OpQvM4Y51+kO6DUVr3rwjrdVO9wpFt+n/hdQ92TNif17RMJtE5AGaQ6BN3yJQIDAQAB;" - ] + ], + "type": "TXT" } - ] + ], + "registrar": "none" } - ] + ], + "registrars": [] } diff --git a/pkg/js/parse_tests/019-ignored-records.json b/pkg/js/parse_tests/019-ignored-records.json index 95faa2a78..1ec504e20 100644 --- a/pkg/js/parse_tests/019-ignored-records.json +++ b/pkg/js/parse_tests/019-ignored-records.json @@ -1,16 +1,15 @@ { - "registrars": [], "dns_providers": [], "domains": [ { - "name": "foo.com", - "registrar": "none", "dnsProviders": {}, - "records": [ - ], "ignored_labels": [ "testignore" - ] + ], + "name": "foo.com", + "records": [], + "registrar": "none" } - ] -} \ No newline at end of file + ], + "registrars": [] +} diff --git a/pkg/js/parse_tests/019-r53-alias.json b/pkg/js/parse_tests/019-r53-alias.json index a2dee4070..17042784a 100644 --- a/pkg/js/parse_tests/019-r53-alias.json +++ b/pkg/js/parse_tests/019-r53-alias.json @@ -1,111 +1,111 @@ { - "registrars": [], "dns_providers": [], "domains": [ { - "name": "foo.com", - "registrar": "none", "dnsProviders": {}, + "name": "foo.com", "records": [ { - "type": "R53_ALIAS", "name": "mxtest", - "target": "foo.com.", "r53_alias": { "type": "MX" - } + }, + "target": "foo.com.", + "type": "R53_ALIAS" }, { - "type": "R53_ALIAS", "name": "atest", - "target": "foo.com.", "r53_alias": { "type": "A" - } + }, + "target": "foo.com.", + "type": "R53_ALIAS" }, { - "type": "R53_ALIAS", "name": "atest", - "target": "foo.com.", "r53_alias": { "type": "A", "zone_id": "Z2FTEDLFRTF" - } + }, + "target": "foo.com.", + "type": "R53_ALIAS" }, { - "type": "R53_ALIAS", "name": "aaaatest", - "target": "foo.com.", "r53_alias": { "type": "AAAA" - } + }, + "target": "foo.com.", + "type": "R53_ALIAS" }, { - "type": "R53_ALIAS", "name": "aaaatest", - "target": "foo.com.", "r53_alias": { "type": "AAAA", "zone_id": "ERERTFGFGF" - } + }, + "target": "foo.com.", + "type": "R53_ALIAS" }, { - "type": "R53_ALIAS", "name": "cnametest", - "target": "foo.com.", "r53_alias": { "type": "CNAME" - } + }, + "target": "foo.com.", + "type": "R53_ALIAS" }, { - "type": "R53_ALIAS", "name": "ptrtest", - "target": "foo.com.", "r53_alias": { "type": "PTR" - } + }, + "target": "foo.com.", + "type": "R53_ALIAS" }, { - "type": "R53_ALIAS", "name": "txttest", - "target": "foo.com.", "r53_alias": { "type": "TXT" - } + }, + "target": "foo.com.", + "type": "R53_ALIAS" }, { - "type": "R53_ALIAS", "name": "srvtest", - "target": "foo.com.", "r53_alias": { "type": "SRV" - } + }, + "target": "foo.com.", + "type": "R53_ALIAS" }, { - "type": "R53_ALIAS", "name": "spftest", - "target": "foo.com.", "r53_alias": { "type": "SPF" - } + }, + "target": "foo.com.", + "type": "R53_ALIAS" }, { - "type": "R53_ALIAS", "name": "caatest", - "target": "foo.com.", "r53_alias": { "type": "CAA" - } + }, + "target": "foo.com.", + "type": "R53_ALIAS" }, { - "type": "R53_ALIAS", "name": "naptrtest", - "target": "foo.com.", "r53_alias": { "type": "NAPTR" - } + }, + "target": "foo.com.", + "type": "R53_ALIAS" } - ] + ], + "registrar": "none" } - ] -} \ No newline at end of file + ], + "registrars": [] +} diff --git a/pkg/js/parse_tests/020-nameserver-ttl.json b/pkg/js/parse_tests/020-nameserver-ttl.json index 84e88116c..9672e2cf4 100644 --- a/pkg/js/parse_tests/020-nameserver-ttl.json +++ b/pkg/js/parse_tests/020-nameserver-ttl.json @@ -1,24 +1,24 @@ { - "registrars": [], "dns_providers": [], "domains": [ { - "name": "foo.com", - "registrar": "none", "dnsProviders": {}, "meta": { "ns_ttl": "86400" }, - "records": [] + "name": "foo.com", + "records": [], + "registrar": "none" }, { - "name": "bar.com", - "registrar": "none", "dnsProviders": {}, "meta": { "ns_ttl": "300" }, - "records": [] + "name": "bar.com", + "records": [], + "registrar": "none" } - ] + ], + "registrars": [] }