diff --git a/mongo/integration/unified_spec_test.go b/mongo/integration/unified_spec_test.go index c12df5f6ea..7689b614ec 100644 --- a/mongo/integration/unified_spec_test.go +++ b/mongo/integration/unified_spec_test.go @@ -162,7 +162,19 @@ type expectation struct { } type outcome struct { - Collection *outcomeCollection `bson:"collection"` + Collection *outcomeCollection + CollectionData []*collectionData +} + +func (outcome *outcome) UnmarshalBSON(b []byte) error { + var v struct { + Collection *outcomeCollection `bson:"collection"` + } + err := bson.UnmarshalWithRegistry(specTestRegistry, b, &v) + if err == nil { + outcome.Collection = v.Collection + } + return err } type outcomeCollection struct { @@ -170,6 +182,12 @@ type outcomeCollection struct { Data interface{} `bson:"data"` } +type collectionData struct { + DatabaseName string `bson:"databaseName"` + CollectionName string `bson:"collectionName"` + Documents []bson.Raw `bson:"documents"` +} + type operationError struct { ErrorContains *string `bson:"errorContains"` ErrorCodeName *string `bson:"errorCodeName"`