Esempio n. 1
0
// Hook up gocheck into the "go test" runner.
func Test(t *testing.T) {
	output := io.MultiWriter(
		os.Stdout,
		report.NewSubunitV2ParserReporter(&report.FileReporter{}))
	runner.TestingT(t, output)

	if _, err := os.Stat(config.DefaultFileName); err == nil {
		cfg, err := config.ReadConfig(config.DefaultFileName)
		if err != nil {
			t.Fatalf("Error reading config: %v", err)
		}

		if err := tearDownSnapd(cfg.FromBranch); err != nil {
			t.Fatalf("Error stopping daemon: %v", err)
		}
	}
}
Esempio n. 2
0
// Hook up gocheck into the "go test" runner.
func Test(t *testing.T) {
	output := io.MultiWriter(
		os.Stdout,
		report.NewSubunitV2ParserReporter(&report.FileReporter{}))
	runner.TestingT(t, output)
}