OLD | NEW |
1 package mongo | 1 package mongo |
2 | 2 |
3 import ( | 3 import ( |
4 "io/ioutil" | 4 "io/ioutil" |
5 "os" | 5 "os" |
6 "path" | 6 "path" |
7 "path/filepath" | 7 "path/filepath" |
8 "testing" | 8 "testing" |
9 | 9 |
10 jc "github.com/juju/testing/checkers" | 10 jc "github.com/juju/testing/checkers" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 testJournalDirs(dir, c) | 134 testJournalDirs(dir, c) |
135 c.Check(oldsvc.Installed(), jc.IsFalse) | 135 c.Check(oldsvc.Installed(), jc.IsFalse) |
136 c.Check(svc.Installed(), jc.IsTrue) | 136 c.Check(svc.Installed(), jc.IsTrue) |
137 | 137 |
138 // now check we can call it multiple times without error | 138 // now check we can call it multiple times without error |
139 err = EnsureMongoServer(dir, port) | 139 err = EnsureMongoServer(dir, port) |
140 c.Assert(err, gc.IsNil) | 140 c.Assert(err, gc.IsNil) |
141 | 141 |
142 } | 142 } |
143 | 143 |
| 144 func (s *MongoSuite) TestMongoPackageForSeries(c *gc.C) { |
| 145 var pkg string |
| 146 |
| 147 pkg = MongoPackageForSeries("precise") |
| 148 c.Assert(pkg, gc.Equals, "mongodb-server") |
| 149 |
| 150 pkg = MongoPackageForSeries("trusty") |
| 151 c.Assert(pkg, gc.Equals, "juju-mongodb") |
| 152 } |
| 153 |
144 func makeService(name string, c *gc.C) *upstart.Conf { | 154 func makeService(name string, c *gc.C) *upstart.Conf { |
145 conf := &upstart.Conf{ | 155 conf := &upstart.Conf{ |
146 Desc: "foo", | 156 Desc: "foo", |
147 Service: *upstart.NewService(name), | 157 Service: *upstart.NewService(name), |
148 Cmd: "echo hi", | 158 Cmd: "echo hi", |
149 } | 159 } |
150 err := conf.Install() | 160 err := conf.Install() |
151 c.Assert(err, gc.IsNil) | 161 c.Assert(err, gc.IsNil) |
152 return conf | 162 return conf |
153 } | 163 } |
OLD | NEW |