Exemple #1
0
func (s *MongoSuite) TestUpstartServiceIPv6(c *gc.C) {
	dataDir := c.MkDir()

	svc, err := mongo.UpstartService("", dataDir, dataDir, mongo.JujuMongodPath, 1234, 1024)
	c.Assert(err, gc.IsNil)
	c.Assert(strings.Contains(svc.Conf.Cmd, "--ipv6"), jc.IsTrue)
}
Exemple #2
0
func (s *MongoSuite) TestUpstartServiceWithReplSet(c *gc.C) {
	dataDir := c.MkDir()

	svc, _, err := mongo.UpstartService("", dataDir, dataDir, 1234, 1024)
	c.Assert(err, gc.IsNil)
	c.Assert(strings.Contains(svc.Cmd, "--replSet"), jc.IsTrue)
}
Exemple #3
0
func (s *MongoSuite) TestUpstartServiceWithJournal(c *gc.C) {
	dataDir := c.MkDir()

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