Skip to content

Commit dc6a1ef

Browse files
authored
Merge pull request #167 from juju/nomgo
#167 mgo testing provided now by juju/mgo#22
2 parents a0ff61f + ce0bddb commit dc6a1ef

8 files changed

Lines changed: 74 additions & 1278 deletions

File tree

checkers/codec.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"encoding/json"
88
"fmt"
99

10-
"github.com/juju/mgo/v2/bson"
1110
gc "gopkg.in/check.v1"
1211
"gopkg.in/yaml.v2"
1312
)
@@ -18,17 +17,6 @@ type codecEqualChecker struct {
1817
unmarshal func([]byte, interface{}) error
1918
}
2019

21-
// BSONEquals defines a checker that checks whether a byte slice, when
22-
// unmarshaled as BSON, is equal to the given value. Rather than
23-
// unmarshaling into something of the expected body type, we reform
24-
// the expected body in BSON and back to interface{} so we can check
25-
// the whole content. Otherwise we lose information when unmarshaling.
26-
var BSONEquals = &codecEqualChecker{
27-
name: "BSONEquals",
28-
marshal: bson.Marshal,
29-
unmarshal: bson.Unmarshal,
30-
}
31-
3220
// JSONEquals defines a checker that checks whether a byte slice, when
3321
// unmarshaled as JSON, is equal to the given value.
3422
// Rather than unmarshaling into something of the expected

go.mod

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,17 @@ module github.com/juju/testing
33
go 1.17
44

55
require (
6-
github.com/juju/clock v0.0.0-20190205081909-9c5c9712527c
7-
github.com/juju/collections v0.0.0-20200605021417-0d0ec82b7271
86
github.com/juju/errors v0.0.0-20220203013757-bd733f3c86b9
97
github.com/juju/loggo v0.0.0-20210728185423-eebad3a902c4
10-
github.com/juju/mgo/v2 v2.0.0-20210302023703-70d5d206e208
11-
github.com/juju/retry v0.0.0-20180821225755-9058e192b216
12-
github.com/juju/utils/v3 v3.0.0-20220130232349-cd7ecef0e94a
13-
github.com/juju/version/v2 v2.0.0-20211007103408-2e8da085dc23
8+
github.com/juju/utils/v3 v3.0.0
149
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
1510
gopkg.in/yaml.v2 v2.4.0
1611
)
1712

1813
require (
14+
github.com/juju/clock v0.0.0-20220203021603-d9deb868a28a // indirect
1915
github.com/kr/pretty v0.2.1 // indirect
2016
github.com/kr/text v0.2.0 // indirect
21-
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a // indirect
22-
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect
17+
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect
18+
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f // indirect
2319
)

go.sum

Lines changed: 68 additions & 9 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)