Fix the testcases

This commit is contained in:
Miek Gieben 2012-03-04 22:35:48 +01:00
parent 97a07cd326
commit 387e6f1c49
2 changed files with 2 additions and 3 deletions

View File

@ -70,7 +70,7 @@ func TestClientEDNS0(t *testing.T) {
func TestClientTsigAXFR(t *testing.T) {
m := new(Msg)
m.SetAxfr("miek.nl.")
m.SetTsig("axfr.", HmacMD5, 300, uint64(time.Now().Unix()))
m.SetTsig("axfr.", HmacMD5, 300, m.MsgHdr.Id, time.Now().Unix())
c := NewClient()
c.TsigSecret = map[string]string{"axfr.": "so6ZGir4GPAqINNh9U5c3A=="}

View File

@ -11,8 +11,7 @@ func HelloServer(w ResponseWriter, req *Msg) {
m.Extra = make([]RR, 1)
m.Extra[0] = &RR_TXT{Hdr: RR_Header{Name: m.Question[0].Name, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello world"}}
buf, _ := m.Pack()
w.Write(buf)
w.Write(m)
}
func TestServing(t *testing.T) {