Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

records: use SOA mname instead of rname #502

Merged
merged 4 commits into from
Jul 12, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion errorutil/errorutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ func Ignore(f ErrorFunction) {
if err := f(); err != nil {
return
}
return
}
8 changes: 0 additions & 8 deletions exchanger/exchanger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ func TestInstrumentation(t *testing.T) {
}
}

func stubs(ed ...exchanged) []Exchanger {
exs := make([]Exchanger, len(ed))
for i := range ed {
exs[i] = stub(ed[i])
}
return exs
}

func stub(e exchanged) Exchanger {
return Func(func(*dns.Msg, string) (*dns.Msg, time.Duration, error) {
return e.m, e.rtt, e.err
Expand Down
2 changes: 1 addition & 1 deletion records/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func (rg *RecordGenerator) ParseState(c Config, masters ...string) error {
hostSpec = labels.RFC952
}

return rg.InsertState(sj, c.Domain, c.SOARname, c.Listener, masters, c.IPSources, hostSpec)
return rg.InsertState(sj, c.Domain, c.SOAMname, c.Listener, masters, c.IPSources, hostSpec)
}

// Tries each master and looks for the leader
Expand Down
2 changes: 1 addition & 1 deletion records/generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func TestNTasks(t *testing.T) {
rg.insertRR("blah.mesos", "10.0.0.1", A)
rg.insertRR("blah.mesos", "10.0.0.2", A)

k, _ := rg.As["blah.mesos"]
k := rg.As["blah.mesos"]

if len(k) != 2 {
t.Error("should only have 2 A records")
Expand Down
15 changes: 0 additions & 15 deletions resolver/resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,21 +410,6 @@ func fakeDNS() (*Resolver, error) {
return res, nil
}

func onError(abort <-chan struct{}, errCh <-chan error, f func(error)) <-chan struct{} {
ch := make(chan struct{})
go func() {
select {
case <-abort:
case e := <-errCh:
if e != nil {
defer close(ch)
f(e)
}
}
}()
return ch
}

func TestMultiError(t *testing.T) {
me := multiError(nil)
me.Add()
Expand Down