Index: testing/mgo_test.go |
=== modified file 'testing/mgo_test.go' |
--- testing/mgo_test.go 2012-08-21 15:02:11 +0000 |
+++ testing/mgo_test.go 2012-09-26 01:26:37 +0000 |
@@ -4,20 +4,26 @@ |
"labix.org/v2/mgo/bson" |
. "launchpad.net/gocheck" |
"launchpad.net/juju-core/testing" |
+ stdtesting "testing" |
) |
type mgoSuite struct{} |
-var _ = Suite(mgoSuite{}) |
- |
-func (mgoSuite) TestMgoStartAndClean(c *C) { |
- server, dbdir := testing.StartMgoServer() |
+var _ = Suite(&mgoSuite{}) |
+ |
+func TestMgoSuite(t *stdtesting.T) { |
+ TestingT(t) |
+} |
+ |
+func (s *mgoSuite) TestMgoStartAndClean(c *C) { |
+ server, dbdir, err := testing.StartMgoServer() |
+ c.Assert(err, IsNil) |
defer testing.MgoDestroy(server, dbdir) |
c.Assert(testing.MgoAddr, Not(Equals), "") |
session := testing.MgoDial() |
menu := session.DB("food").C("menu") |
- err := menu.Insert( |
+ err = menu.Insert( |
bson.D{{"spam", "lots"}}, |
bson.D{{"eggs", "fried"}}, |
) |