示例#1
0
文件: mongo_test.go 项目: jkary/core
func (s *MongoSuite) TestUpstartService(c *gc.C) {
	dataDir := c.MkDir()

	svc, _, err := mongo.UpstartService("", dataDir, dataDir, 1234)
	c.Assert(err, gc.IsNil)
	c.Assert(strings.Contains(svc.Cmd, "--replSet"), jc.IsTrue)
}
示例#2
0
文件: mongo_test.go 项目: jkary/core
func (s *MongoSuite) TestUpstartServiceWithJournal(c *gc.C) {
	dataDir := c.MkDir()

	svc, _, err := mongo.UpstartService("", dataDir, dataDir, 1234)
	c.Assert(err, gc.IsNil)
	journalPresent := strings.Contains(svc.Cmd, " --journal ") || strings.HasSuffix(svc.Cmd, " --journal")
	c.Assert(journalPresent, jc.IsTrue)
}