mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
migrate code for github
This commit is contained in:
6
js/parse_tests/001-basic.js
Normal file
6
js/parse_tests/001-basic.js
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
var REG = NewRegistrar("Third-Party","NONE");
|
||||
var CF = NewDSP("Cloudflare", "CLOUDFLAREAPI")
|
||||
D("foo.com",REG,CF,
|
||||
A("@","1.2.3.4")
|
||||
);
|
30
js/parse_tests/001-basic.json
Normal file
30
js/parse_tests/001-basic.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"registrars": [
|
||||
{
|
||||
"name": "Third-Party",
|
||||
"type": "NONE"
|
||||
}
|
||||
],
|
||||
"dns_service_providers": [
|
||||
{
|
||||
"name": "Cloudflare",
|
||||
"type": "CLOUDFLAREAPI"
|
||||
}
|
||||
],
|
||||
"domains": [
|
||||
{
|
||||
"name": "foo.com",
|
||||
"registrar": "Third-Party",
|
||||
"dsps": [
|
||||
"Cloudflare"
|
||||
],
|
||||
"records": [
|
||||
{
|
||||
"type": "A",
|
||||
"name": "@",
|
||||
"target": "1.2.3.4"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
5
js/parse_tests/002-ttl.js
Normal file
5
js/parse_tests/002-ttl.js
Normal file
@@ -0,0 +1,5 @@
|
||||
var REG = NewRegistrar("Third-Party","NONE");
|
||||
var CF = NewDSP("Cloudflare", "CLOUDFLAREAPI")
|
||||
D("foo.com",REG,CF,
|
||||
A("@","1.2.3.4",TTL(42))
|
||||
);
|
31
js/parse_tests/002-ttl.json
Normal file
31
js/parse_tests/002-ttl.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"registrars": [
|
||||
{
|
||||
"name": "Third-Party",
|
||||
"type": "NONE"
|
||||
}
|
||||
],
|
||||
"dns_service_providers": [
|
||||
{
|
||||
"name": "Cloudflare",
|
||||
"type": "CLOUDFLAREAPI"
|
||||
}
|
||||
],
|
||||
"domains": [
|
||||
{
|
||||
"name": "foo.com",
|
||||
"registrar": "Third-Party",
|
||||
"dsps": [
|
||||
"Cloudflare"
|
||||
],
|
||||
"records": [
|
||||
{
|
||||
"type": "A",
|
||||
"name": "@",
|
||||
"target": "1.2.3.4",
|
||||
"ttl": 42
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
5
js/parse_tests/003-meta.js
Normal file
5
js/parse_tests/003-meta.js
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
var CLOUDFLARE = NewRegistrar("Cloudflare","CLOUDFLAREAPI");
|
||||
D("foo.com",CLOUDFLARE,
|
||||
A("@","1.2.3.4",{"cloudflare_proxy":"ON"})
|
||||
);
|
26
js/parse_tests/003-meta.json
Normal file
26
js/parse_tests/003-meta.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"registrars": [
|
||||
{
|
||||
"name": "Cloudflare",
|
||||
"type": "CLOUDFLAREAPI"
|
||||
}
|
||||
],
|
||||
"dns_service_providers": [],
|
||||
"domains": [
|
||||
{
|
||||
"name": "foo.com",
|
||||
"registrar": "Cloudflare",
|
||||
"dsps": [],
|
||||
"records": [
|
||||
{
|
||||
"type": "A",
|
||||
"name": "@",
|
||||
"target": "1.2.3.4",
|
||||
"meta": {
|
||||
"cloudflare_proxy": "ON"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
10
js/parse_tests/004-ips.js
Normal file
10
js/parse_tests/004-ips.js
Normal file
@@ -0,0 +1,10 @@
|
||||
var REG = NewRegistrar("Third-Party","NONE");
|
||||
var CF = NewDSP("Cloudflare", "CLOUDFLAREAPI")
|
||||
|
||||
var BASE = IP("1.2.3.4")
|
||||
|
||||
D("foo.com",REG,CF,
|
||||
A("@",BASE),
|
||||
A("p1",BASE+1),
|
||||
A("p255", BASE+255)
|
||||
);
|
28
js/parse_tests/004-ips.json
Normal file
28
js/parse_tests/004-ips.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"registrars": [
|
||||
{
|
||||
"name": "Third-Party",
|
||||
"type": "NONE"
|
||||
}
|
||||
],
|
||||
"dns_service_providers": [
|
||||
{
|
||||
"name": "Cloudflare",
|
||||
"type": "CLOUDFLAREAPI"
|
||||
}
|
||||
],
|
||||
"domains": [
|
||||
{
|
||||
"name": "foo.com",
|
||||
"registrar": "Third-Party",
|
||||
"dsps": [
|
||||
"Cloudflare"
|
||||
],
|
||||
"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"}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
7
js/parse_tests/005-multipleDomains.js
Normal file
7
js/parse_tests/005-multipleDomains.js
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
var REG = NewRegistrar("Third-Party","NONE");
|
||||
var CF = NewDSP("Cloudflare", "CLOUDFLAREAPI")
|
||||
D("foo.com",REG,CF,
|
||||
A("@","1.2.3.4")
|
||||
);
|
||||
D("foo.com",REG);
|
35
js/parse_tests/005-multipleDomains.json
Normal file
35
js/parse_tests/005-multipleDomains.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{ "registrars": [
|
||||
{
|
||||
"name": "Third-Party",
|
||||
"type": "NONE"
|
||||
}
|
||||
],
|
||||
"dns_service_providers": [
|
||||
{
|
||||
"name": "Cloudflare",
|
||||
"type": "CLOUDFLAREAPI"
|
||||
}
|
||||
],
|
||||
"domains": [
|
||||
{
|
||||
"name": "foo.com",
|
||||
"registrar": "Third-Party",
|
||||
"dsps": [
|
||||
"Cloudflare"
|
||||
],
|
||||
"records": [
|
||||
{
|
||||
"type": "A",
|
||||
"name": "@",
|
||||
"target": "1.2.3.4"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "foo.com",
|
||||
"registrar": "Third-Party",
|
||||
"dsps": [],
|
||||
"records": []
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user