Esempio n. 1
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()
	}
}
Esempio n. 2
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)
	}
}
Esempio n. 3
0
// See printUsage for a description.
func main() {
	pathToConfigFile := parseCommandLine()
	config, err := models.LoadConfigFile(pathToConfigFile)
	if err != nil {
		fmt.Fprintf(os.Stderr, err.Error())
		os.Exit(1)
	}
	_context := context.NewContext(config)
	_context.MessageLog.Info("apt_volume_service started")

	volumeService := service.NewVolumeService(
		_context.Config.VolumeServicePort,
		_context.MessageLog)
	volumeService.Serve()
}