mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	Clean up tests logging (#1979)
* Clean up tests logging This cleans up the travis logs so you can see the failures better. Older tests in tests/ would call log.SetOutput(ioutil.Discard) in a haphazard way. This add log.Discard and put an `init` function in each package's dir (no way to do this globally). The cleanup in tests/ is clear. All plugins also got this init function to have some uniformity and kill any (future) logging there in the tests as well. There is a one-off in pkg/healthcheck because that does log. Signed-off-by: Miek Gieben <miek@miek.nl> * bring back original log_test.go Signed-off-by: Miek Gieben <miek@miek.nl> * suppress logging here as well Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
		| @@ -1,8 +1,6 @@ | ||||
| package test | ||||
|  | ||||
| import ( | ||||
| 	"io/ioutil" | ||||
| 	"log" | ||||
| 	"testing" | ||||
|  | ||||
| 	// Plug in CoreDNS, needed for AppVersion and AppName in this test. | ||||
| @@ -24,8 +22,6 @@ func TestChaos(t *testing.T) { | ||||
| 	} | ||||
| 	defer i.Stop() | ||||
|  | ||||
| 	log.SetOutput(ioutil.Discard) | ||||
|  | ||||
| 	m := new(dns.Msg) | ||||
| 	m.SetQuestion("version.bind.", dns.TypeTXT) | ||||
| 	m.Question[0].Qclass = dns.ClassCHAOS | ||||
|   | ||||
		Reference in New Issue
	
	Block a user