Beispiel #1
0
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)
}
Beispiel #2
0
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)
}