Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
repository: make test more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco Souza committed Oct 28, 2014
1 parent 108eeb0 commit 686effb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion repository/repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/tsuru/gandalf/fs"
"github.com/tsuru/gandalf/multipartzip"
fstesting "github.com/tsuru/tsuru/fs/testing"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"launchpad.net/gocheck"
)
Expand Down Expand Up @@ -458,7 +459,7 @@ func (s *S) TestUpdateErrsWithAlreadyExists(c *gocheck.C) {
Name: "subjection",
}
err = Update(r1.Name, update)
c.Assert(err, gocheck.ErrorMatches, "^insertDocument :: caused by :: 11000 E11000 duplicate key error .+$")
c.Assert(mgo.IsDup(err), gocheck.Equals, true)
}

func (s *S) TestUpdateErrsWhenNotFound(c *gocheck.C) {
Expand Down

0 comments on commit 686effb

Please sign in to comment.