github.com/Goboolean/common@v0.0.0-20231130153141-cb54596b217d/pkg/kafka/main_test.go (about) 1 package kafka_test 2 3 import ( 4 "os" 5 "sync" 6 "testing" 7 8 _ "github.com/Goboolean/common/pkg/env" 9 log "github.com/sirupsen/logrus" 10 ) 11 12 var mutex = &sync.Mutex{} 13 14 // List for perfect test coverage 15 // [*] 1. Ping test 16 // [*] 2. Produce and consume 17 // [ ] 3. Produce and consume not existing topic 18 // [*] 4. Consume with different group 19 // [*] 5. Consume with same group 20 // [ ] 6. Consume with registry 21 // [ ] 7. Consume invalid typed message 22 23 func TestMain(m *testing.M) { 24 log.SetFormatter(&log.TextFormatter{ 25 DisableTimestamp: true, 26 }) 27 log.SetLevel(log.TraceLevel) 28 29 code := m.Run() 30 os.Exit(code) 31 }