github.com/Goboolean/common@v0.0.0-20231130153141-cb54596b217d/deprecated/kafka/main_test.go (about) 1 package kafka_test 2 3 import ( 4 "os" 5 "testing" 6 7 "github.com/joho/godotenv" 8 ) 9 10 11 12 func TestMain(m *testing.M) { 13 14 if err := os.Chdir("../../"); err != nil { 15 panic(err) 16 } 17 18 if err := godotenv.Load(); err != nil { 19 panic(err) 20 } 21 22 code := m.Run() 23 24 os.Exit(code) 25 }