Skip to content

Commit 596c496

Browse files
committed
GODRIVER-2764 update fle2 tests (#1197)
* update fle2 tests * fix TestFLE2CreateCollection
1 parent f444b06 commit 596c496

File tree

5 files changed

+252
-252
lines changed

5 files changed

+252
-252
lines changed

mongo/integration/client_side_encryption_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -409,9 +409,9 @@ func TestFLE2CreateCollection(t *testing.T) {
409409

410410
efJSON := `
411411
{
412-
"escCollection": "encryptedCollection.esc",
413-
"eccCollection": "encryptedCollection.ecc",
414-
"ecocCollection": "encryptedCollection.ecoc",
412+
"escCollection": "enxcol_.encryptedCollection.esc",
413+
"eccCollection": "enxcol_.encryptedCollection.ecc",
414+
"ecocCollection": "enxcol_.encryptedCollection.ecoc",
415415
"fields": [
416416
{
417417
"path": "firstName",
@@ -435,11 +435,11 @@ func TestFLE2CreateCollection(t *testing.T) {
435435
mt.Run("CreateCollection from encryptedFields", func(mt *mtest.T) {
436436
// Drop data and state collections to clean up from a prior test run.
437437
{
438-
err = mt.DB.Collection("encryptedCollection.esc").Drop(context.Background())
438+
err = mt.DB.Collection("enxcol_.encryptedCollection.esc").Drop(context.Background())
439439
assert.Nil(mt, err, "error in Drop: %v", err)
440-
err = mt.DB.Collection("encryptedCollection.ecc").Drop(context.Background())
440+
err = mt.DB.Collection("enxcol_.encryptedCollection.ecc").Drop(context.Background())
441441
assert.Nil(mt, err, "error in Drop: %v", err)
442-
err = mt.DB.Collection("encryptedCollection.ecoc").Drop(context.Background())
442+
err = mt.DB.Collection("enxcol_.encryptedCollection.ecoc").Drop(context.Background())
443443
assert.Nil(mt, err, "error in Drop: %v", err)
444444
err := mt.DB.Collection("coll").Drop(context.Background())
445445
assert.Nil(mt, err, "error in Drop: %v", err)
@@ -453,17 +453,17 @@ func TestFLE2CreateCollection(t *testing.T) {
453453
assert.Nil(mt, err, "error in ListCollectionNames")
454454
assert.Equal(mt, got, []string{"coll"}, "expected ['coll'], got: %v", got)
455455

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

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

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

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

0 commit comments

Comments
 (0)