diff --git a/mongo/mongo_test.go b/mongo/mongo_test.go index af12e3d50cf..93f69e7aed8 100644 --- a/mongo/mongo_test.go +++ b/mongo/mongo_test.go @@ -138,11 +138,11 @@ func (s *MongoSuite) assertMongoConfigFile(c *gc.C, dataDir string, ipV6 bool) { c.Assert(err, jc.ErrorIsNil) part1 := fmt.Sprintf(` # WARNING -# autogenerated by juju on %s +# autogenerated by juju on .* # manual changes to this file are likely to be overwritten auth = true bind_ip_all = true -dbpath = %s/db`[1:], s.clock.Now().UTC().Format(time.RFC822), dataDir) +dbpath = %s/db`[1:], dataDir) if ipV6 { part1 += "\nipv6 = true" } @@ -161,7 +161,7 @@ tlsCertificateKeyFile = %s/server.pem tlsCertificateKeyFilePassword=ignored tlsMode = requireTLS`, dataDir, dataDir, dataDir) - c.Assert(string(contents), jc.DeepEquals, part1+part2) + c.Assert(string(contents), gc.Matches, part1+part2) } func (s *MongoSuite) TestEnsureServerInstalled(c *gc.C) {