-
Notifications
You must be signed in to change notification settings - Fork 0
/
mgo.go
28 lines (23 loc) · 860 Bytes
/
mgo.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2012, 2013 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.
package testing
import (
"testing"
jujutesting "github.com/juju/testing"
)
// MgoTestPackage should be called to register the tests for any package
// that requires a connection to a MongoDB server.
//
// The server will be configured without SSL enabled, which slows down
// tests. For tests that care about security (which should be few), use
// MgoSSLTestPackage.
func MgoTestPackage(t *testing.T) {
jujutesting.MgoServer.EnableReplicaSet = true
jujutesting.MgoTestPackage(t, nil)
}
// MgoSSLTestPackage should be called to register the tests for any package
// that requires a secure (SSL) connection to a MongoDB server.
func MgoSSLTestPackage(t *testing.T) {
jujutesting.MgoServer.EnableReplicaSet = true
jujutesting.MgoTestPackage(t, Certs)
}