Example #1
0
func TestMain(m *testing.M) {
	err := etcdtest.Start()
	if err != nil {
		log.Fatal(err)
	}

	defer func() {
		err := etcdtest.Stop()
		if err != nil {
			log.Fatal(err)
		}
	}()

	os.Exit(m.Run())
}
Example #2
0
func TestMain(m *testing.M) {
	err := etcdtest.Start()
	if err != nil {
		log.Fatal(err)
	}

	defer func() {
		err := etcdtest.Stop()
		if err != nil {
			log.Fatal(err)
		}
	}()

	urls, err := stringsToUrls(etcdtest.Urls...)
	if err != nil {
		log.Fatal(err)
	}

	testEtcdUrls = urls

	os.Exit(m.Run())
}