mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	kubernetes: Add zone filtering to fallthrough (#1353)
* Add zone filtering to fallthrough * Doh. gofmt * Update documentation
This commit is contained in:
		| @@ -1 +1,21 @@ | ||||
| package plugin | ||||
|  | ||||
| import "testing" | ||||
|  | ||||
| func TestFallthrough(t *testing.T) { | ||||
| 	if Fallthrough(nil, "foo.com.") { | ||||
| 		t.Errorf("Expected false, got true for nil fallthrough") | ||||
| 	} | ||||
|  | ||||
| 	if !Fallthrough(&[]string{}, "foo.net.") { | ||||
| 		t.Errorf("Expected true, got false for all zone fallthrough") | ||||
| 	} | ||||
|  | ||||
| 	if Fallthrough(&[]string{"foo.com", "bar.com"}, "foo.net") { | ||||
| 		t.Errorf("Expected false, got true for non-matching fallthrough zone") | ||||
| 	} | ||||
|  | ||||
| 	if !Fallthrough(&[]string{"foo.com.", "bar.com."}, "bar.com.") { | ||||
| 		t.Errorf("Expected true, got false for matching fallthrough zone") | ||||
| 	} | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user