mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	mw/kubernetes: add reverse test case (#932)
Add a non-arpa testcase to the reverse test.
This commit is contained in:
		| @@ -96,6 +96,13 @@ func TestReverse(t *testing.T) { | |||||||
| 				test.SOA("0.10.in-addr.arpa.	300	IN	SOA	ns.dns.0.10.in-addr.arpa. hostmaster.0.10.in-addr.arpa. 1502782828 7200 1800 86400 60"), | 				test.SOA("0.10.in-addr.arpa.	300	IN	SOA	ns.dns.0.10.in-addr.arpa. hostmaster.0.10.in-addr.arpa. 1502782828 7200 1800 86400 60"), | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
|  | 		{ | ||||||
|  | 			Qname: "example.org.cluster.local.", Qtype: dns.TypePTR, | ||||||
|  | 			Rcode: dns.RcodeSuccess, | ||||||
|  | 			Ns: []dns.RR{ | ||||||
|  | 				test.SOA("cluster.local.       300     IN      SOA     ns.dns.cluster.local. hostmaster.cluster.local. 1502989566 7200 1800 86400 60"), | ||||||
|  | 			}, | ||||||
|  | 		}, | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	ctx := context.TODO() | 	ctx := context.TODO() | ||||||
| @@ -109,9 +116,6 @@ func TestReverse(t *testing.T) { | |||||||
| 			t.Errorf("Test %d: expected no error, got %v", i, err) | 			t.Errorf("Test %d: expected no error, got %v", i, err) | ||||||
| 			return | 			return | ||||||
| 		} | 		} | ||||||
| 		if tc.Error != nil { |  | ||||||
| 			continue |  | ||||||
| 		} |  | ||||||
|  |  | ||||||
| 		resp := w.Msg | 		resp := w.Msg | ||||||
| 		if resp == nil { | 		if resp == nil { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user