Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(46)

Side by Side Diff: agent/mongo/mongo_test.go

Issue 82550043: agent/mongo: added MongoSelectPeerAddress
Patch Set: Created 11 years ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « agent/mongo/mongo.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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) {
wwitzel3 2014/03/31 11:23:17 This is unrelated I just noticed that the MongoPac
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 }
OLDNEW
« no previous file with comments | « agent/mongo/mongo.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b