mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-30 17:53:21 -04:00 
			
		
		
		
	finish missing watcher check (#387)
This commit is contained in:
		| @@ -36,10 +36,10 @@ func TestWatcher(t *testing.T) { | |||||||
|  |  | ||||||
| 	// example.org and example.com should exist | 	// example.org and example.com should exist | ||||||
| 	if x := len(a.Zones.Z["example.org."].All()); x != 4 { | 	if x := len(a.Zones.Z["example.org."].All()); x != 4 { | ||||||
| 		t.Fatalf("expected 4 RRs, got %d", x) | 		t.Fatalf("Expected 4 RRs, got %d", x) | ||||||
| 	} | 	} | ||||||
| 	if x := len(a.Zones.Z["example.com."].All()); x != 4 { | 	if x := len(a.Zones.Z["example.com."].All()); x != 4 { | ||||||
| 		t.Fatalf("expected 4 RRs, got %d", x) | 		t.Fatalf("Expected 4 RRs, got %d", x) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// Now remove one file, rescan and see if it's gone. | 	// Now remove one file, rescan and see if it's gone. | ||||||
| @@ -48,5 +48,11 @@ func TestWatcher(t *testing.T) { | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	a.Walk() | 	a.Walk() | ||||||
| 	// TODO(miek): check |  | ||||||
|  | 	if _, ok := a.Zones.Z["example.com."]; ok { | ||||||
|  | 		t.Errorf("Expected %q to be gone.", "example.com.") | ||||||
|  | 	} | ||||||
|  | 	if _, ok := a.Zones.Z["example.org."]; !ok { | ||||||
|  | 		t.Errorf("Expected %q to still be there.", "example.org.") | ||||||
|  | 	} | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user