Fix the tests, but they now fail

This commit is contained in:
Miek Gieben 2012-01-11 14:44:54 +01:00
parent 3fae586071
commit 2143ce0031
3 changed files with 8 additions and 2 deletions

View File

@ -358,6 +358,7 @@ func (w *reply) Send(m *Msg) error {
if !ok {
return ErrSecret
}
// Compressie maakt dit stuk
if err := TsigGenerate(m, w.Client().TsigSecret[secret], w.tsigRequestMAC, w.tsigTimersOnly); err != nil {
return err
}

View File

@ -83,7 +83,7 @@ func TestClientTsigAXFR(t *testing.T) {
if err := c.XfrReceive(m, "85.223.71.124:53"); err != nil {
t.Log("Failed to setup axfr" + err.Error())
t.Fail()
return // Forgot this
return
}
for {
ex := <-c.ReplyChan
@ -91,6 +91,9 @@ func TestClientTsigAXFR(t *testing.T) {
if ex.Error == ErrXfrLast {
break
}
if ex.Reply.Rcode != RcodeSuccess {
break
}
}
}
@ -112,5 +115,8 @@ func TestClientAXFRMultipleMessages(t *testing.T) {
if ex.Error == ErrXfrLast {
break
}
if ex.Reply.Rcode != RcodeSuccess {
break
}
}
}

1
xfr.go
View File

@ -40,7 +40,6 @@ func (w *reply) axfrReceive() {
w.Client().ReplyChan <- &Exchange{w.req, in, ErrId}
return
}
if first {
if !checkXfrSOA(in, true) {
w.Client().ReplyChan <- &Exchange{w.req, in, ErrXfrSoa}