1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Nameserver overhaul (#17)

* go changes to support nameservers_from

* clear nameservers before giving to dsp.

* work

* work

* nameserver updates.

* remove unused

* name.com stinks at NS records.

* whitespace

* removing web(belongs in own repo). First sketch of DSP vs NAMESERVER_FROM

* add DEFAULTS to replace defaultDsps.

* initial gcloud provider. Simple records work.

* namedotcom can do subdomain ns records now.

* fix for mx and txt

* kill dsp acronym
This commit is contained in:
Craig Peterson
2016-12-16 13:10:27 -07:00
committed by GitHub
parent 9cb81da20e
commit 1ea80d5347
50 changed files with 672 additions and 66342 deletions

View File

@@ -1,8 +1,9 @@
package normalize
import (
"github.com/StackExchange/dnscontrol/models"
"testing"
"github.com/StackExchange/dnscontrol/models"
)
func Test_assert_no_enddot(t *testing.T) {
@@ -105,6 +106,20 @@ func Test_transform_cname(t *testing.T) {
}
}
func TestNSAtRoot(t *testing.T) {
//do not allow ns records for @
rec := &models.RecordConfig{Name: "test", Type: "NS", Target: "ns1.name.com."}
errs := validateTargets(rec, "foo.com")
if len(errs) > 0 {
t.Error("Expect no error with ns record on subdomain")
}
rec.Name = "@"
errs = validateTargets(rec, "foo.com")
if len(errs) != 1 {
t.Error("Expect error with ns record on @")
}
}
func TestTransforms(t *testing.T) {
var tests = []struct {
givenIP string