Example #1
0
func (s *EventIntSuite) SetUpTest(c *C) {
	s.eventCfgDir = integrationDir + "/tmp/process_tmp"
	if err := os.MkdirAll(s.eventCfgDir, 0755); err != nil {
		c.Errorf(err.Error())
	}
	balloonPidFile = s.eventCfgDir + "/balloonmem0.pid"
	err := helper.CreateGonitCfg(1, "balloonmem", "./process_tmp", "./goprocess",
		true)
	if err != nil {
		c.Errorf(err.Error())
	}
	helper.CreateGonitSettings("./gonit.pid", "./", "./process_tmp")
	s.gonitCmd, s.stdout, err = helper.StartGonit(s.eventCfgDir)
	if err != nil {
		c.Errorf(err.Error())
	}
}
Example #2
0
func (s *ControlIntSuite) SetUpTest(c *C) {
	s.ctrlCfgDir = integrationDir + "/tmp/process_tmp"
	if err := os.MkdirAll(s.ctrlCfgDir, 0755); err != nil {
		c.Errorf(err.Error())
	}
	controlPidFile1 = s.ctrlCfgDir + "/control0.pid"
	controlPidFile2 = s.ctrlCfgDir + "/control1.pid"
	err := helper.CreateGonitCfg(2, "control", "./process_tmp", "./goprocess",
		false)
	if err != nil {
		c.Errorf(err.Error())
	}
	helper.CreateGonitSettings("./gonit.pid", "./", "./process_tmp")
	s.gonitCmd, _, err = helper.StartGonit(s.ctrlCfgDir)
	if err != nil {
		c.Errorf(err.Error())
	}
}