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) }
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) }