Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions mongo/integration/client_side_encryption_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,9 @@ func TestFLE2CreateCollection(t *testing.T) {

efJSON := `
{
"escCollection": "encryptedCollection.esc",
"eccCollection": "encryptedCollection.ecc",
"ecocCollection": "encryptedCollection.ecoc",
"escCollection": "enxcol_.encryptedCollection.esc",
"eccCollection": "enxcol_.encryptedCollection.ecc",
"ecocCollection": "enxcol_.encryptedCollection.ecoc",
"fields": [
{
"path": "firstName",
Expand All @@ -444,11 +444,11 @@ func TestFLE2CreateCollection(t *testing.T) {
mt.Run("CreateCollection from encryptedFields", func(mt *mtest.T) {
// Drop data and state collections to clean up from a prior test run.
{
err = mt.DB.Collection("encryptedCollection.esc").Drop(context.Background())
err = mt.DB.Collection("enxcol_.encryptedCollection.esc").Drop(context.Background())
assert.Nil(mt, err, "error in Drop: %v", err)
err = mt.DB.Collection("encryptedCollection.ecc").Drop(context.Background())
err = mt.DB.Collection("enxcol_.encryptedCollection.ecc").Drop(context.Background())
assert.Nil(mt, err, "error in Drop: %v", err)
err = mt.DB.Collection("encryptedCollection.ecoc").Drop(context.Background())
err = mt.DB.Collection("enxcol_.encryptedCollection.ecoc").Drop(context.Background())
assert.Nil(mt, err, "error in Drop: %v", err)
err := mt.DB.Collection("coll").Drop(context.Background())
assert.Nil(mt, err, "error in Drop: %v", err)
Expand All @@ -462,17 +462,17 @@ func TestFLE2CreateCollection(t *testing.T) {
assert.Nil(mt, err, "error in ListCollectionNames")
assert.Equal(mt, got, []string{"coll"}, "expected ['coll'], got: %v", got)

got, err = mt.DB.ListCollectionNames(context.Background(), bson.D{{"name", "encryptedCollection.esc"}})
got, err = mt.DB.ListCollectionNames(context.Background(), bson.D{{"name", "enxcol_.encryptedCollection.esc"}})
assert.Nil(mt, err, "error in ListCollectionNames")
assert.Equal(mt, got, []string{"encryptedCollection.esc"}, "expected ['encryptedCollection.esc'], got: %v", got)
assert.Equal(mt, got, []string{"enxcol_.encryptedCollection.esc"}, "expected ['encryptedCollection.esc'], got: %v", got)

got, err = mt.DB.ListCollectionNames(context.Background(), bson.D{{"name", "encryptedCollection.ecc"}})
got, err = mt.DB.ListCollectionNames(context.Background(), bson.D{{"name", "enxcol_.encryptedCollection.ecc"}})
assert.Nil(mt, err, "error in ListCollectionNames")
assert.Equal(mt, got, []string{"encryptedCollection.ecc"}, "expected ['encryptedCollection.ecc'], got: %v", got)
assert.Equal(mt, got, []string{"enxcol_.encryptedCollection.ecc"}, "expected ['encryptedCollection.ecc'], got: %v", got)

got, err = mt.DB.ListCollectionNames(context.Background(), bson.D{{"name", "encryptedCollection.ecoc"}})
got, err = mt.DB.ListCollectionNames(context.Background(), bson.D{{"name", "enxcol_.encryptedCollection.ecoc"}})
assert.Nil(mt, err, "error in ListCollectionNames")
assert.Equal(mt, got, []string{"encryptedCollection.ecoc"}, "expected ['encryptedCollection.ecoc'], got: %v", got)
assert.Equal(mt, got, []string{"enxcol_.encryptedCollection.ecoc"}, "expected ['encryptedCollection.ecoc'], got: %v", got)

indexSpecs, err := mt.DB.Collection("coll").Indexes().ListSpecifications(context.Background())
assert.Nil(mt, err, "error in Indexes().ListSpecifications: %v", err)
Expand Down
Loading