Fix the testcases
This commit is contained in:
parent
97a07cd326
commit
387e6f1c49
|
@ -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=="}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue