Пример #1
0
func TestDiscardLogger(t *testing.T) {
	log := logger.DiscardLogger("logger_test")
	if log == nil {
		t.Error("DiscardLogger returned nil")
	}
	log.Info("This should not cause an error!")
}
Пример #2
0
func runService(t *testing.T) {
	if volumeService == nil {
		log := logger.DiscardLogger("test_volume_service")
		volumeService = service.NewVolumeService(volTestPort, log)
		require.NotNil(t, volumeService)
		go volumeService.Serve()
	}
}
Пример #3
0
func runService(t *testing.T) {
	if volumeService == nil {
		log := logger.DiscardLogger("test_volume_service")
		volumeService = service.NewVolumeService(port, log)
		require.NotNil(t, volumeService)
		go volumeService.Serve()
		time.Sleep(800 * time.Millisecond)
	}
}