Example #1
0
func TestMain(m *testing.M) {
	err := test.CreateTable(table, []string{"cf", "cf2"})
	if err != nil {
		panic(err)
	}
	res := m.Run()
	err = test.DeleteTable(table)
	if err != nil {
		panic(err)
	}

	os.Exit(res)
}
Example #2
0
func TestMain(m *testing.M) {
	if host == nil {
		panic("Host is not set!")
	}

	ac := gohbase.NewAdminClient(*host)
	err := test.CreateTable(ac, table, []string{"cf", "cf2"})
	if err != nil {
		panic(err)
	}
	res := m.Run()
	err = test.DeleteTable(ac, table)
	if err != nil {
		panic(err)
	}

	os.Exit(res)
}