mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-30 17:53:21 -04:00 
			
		
		
		
	| @@ -50,7 +50,7 @@ func errorLogger(code int, qName, qType, err string) { | ||||
| } | ||||
|  | ||||
| func consLogger(cnt uint32, pattern string, p time.Duration) { | ||||
| 	log.Errorf("%d errors like '%s' occured in last %s", cnt, pattern, p) | ||||
| 	log.Errorf("%d errors like '%s' occurred in last %s", cnt, pattern, p) | ||||
| } | ||||
|  | ||||
| func (h *errorHandler) logPattern(i int) { | ||||
|   | ||||
| @@ -78,7 +78,7 @@ func TestConsLogger(t *testing.T) { | ||||
|  | ||||
| 	consLogger(5, "^Error.*!$", 3*time.Second) | ||||
|  | ||||
| 	exp := "[ERROR] plugin/errors: 5 errors like '^Error.*!$' occured in last 3s" | ||||
| 	exp := "[ERROR] plugin/errors: 5 errors like '^Error.*!$' occurred in last 3s" | ||||
| 	act := buf.String() | ||||
| 	if !strings.Contains(act, exp) { | ||||
| 		t.Errorf("Unexpected log message, expected to contain %q, actual %q", exp, act) | ||||
|   | ||||
| @@ -299,8 +299,8 @@ func (r *Request) Scrub(reply *dns.Msg) *dns.Msg { | ||||
| 	// pretty rare. Normally, the loop will exit when l > re, meaning that | ||||
| 	// in the previous iteration either: | ||||
| 	// rl < size: no need to do anything. | ||||
| 	// rl > size: the final size is too large, and if m > 0, the preceeding | ||||
| 	// iteration the size was too small. Select that preceeding size. | ||||
| 	// rl > size: the final size is too large, and if m > 0, the preceding | ||||
| 	// iteration the size was too small. Select that preceding size. | ||||
| 	if rl > size && m > 0 { | ||||
| 		reply.Extra = origExtra[:m-1] | ||||
| 		rl = reply.Len() | ||||
| @@ -334,8 +334,8 @@ func (r *Request) Scrub(reply *dns.Msg) *dns.Msg { | ||||
| 	// pretty rare. Normally, the loop will exit when l > ra, meaning that | ||||
| 	// in the previous iteration either: | ||||
| 	// rl < size: no need to do anything. | ||||
| 	// rl > size: the final size is too large, and if m > 0, the preceeding | ||||
| 	// iteration the size was too small. Select that preceeding size. | ||||
| 	// rl > size: the final size is too large, and if m > 0, the preceding | ||||
| 	// iteration the size was too small. Select that preceding size. | ||||
| 	if rl > size && m > 0 { | ||||
| 		reply.Answer = origAnswer[:m-1] | ||||
| 		// No need to recalc length, as we don't use it. We set truncated anyway. Doing | ||||
|   | ||||
| @@ -42,7 +42,7 @@ func TestCompressScrub(t *testing.T) { | ||||
| 	} | ||||
| 	buf = buf[:n] | ||||
| 	// If there is compression in the returned packet we should look for compression pointers, if found | ||||
| 	// the pointers should return to the domain name in the query (the first domain name that's avaiable for | ||||
| 	// the pointers should return to the domain name in the query (the first domain name that's available for | ||||
| 	// compression. This means we're looking for a combo where the pointers is detected and the offset is 12 | ||||
| 	// the position of the first name after the header. The erratic plugin adds 30 RRs that should all be compressed. | ||||
| 	found := 0 | ||||
|   | ||||
| @@ -161,7 +161,7 @@ google.com:0 { | ||||
| 	} | ||||
| 	defer i.Stop() | ||||
|  | ||||
| 	// send an inital query to setup properly the cache size | ||||
| 	// send an initial query to setup properly the cache size | ||||
| 	m := new(dns.Msg) | ||||
| 	m.SetQuestion("google.com.", dns.TypeA) | ||||
| 	if _, err = dns.Exchange(m, udp); err != nil { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user