@@ -1281,21 +1281,14 @@ document::value operation_runner::_run_create_collection(document::view operatio
1281
1281
1282
1282
auto arguments = operation[" arguments" ].get_document ().value ;
1283
1283
auto collection_name = arguments[" collection" ].get_string ().value ;
1284
- std::cerr << " CREATING COLLECTION NAME: " << collection_name << std::endl;
1285
- std::cerr << " GOT encrypted_fields" << std::endl;
1286
1284
auto session = _lookup_session (arguments);
1287
- std::cerr << " GOT session" << std::endl;
1288
1285
if (session) {
1289
- std::cerr << " HERE 1" << std::endl;
1290
1286
_db->create_collection (*session, collection_name);
1291
1287
} else if (arguments.find (" encryptedFields" ) != arguments.end ()) {
1292
- std::cerr << " HERE 2" << std::endl;
1293
1288
auto encrypted_fields = arguments[" encryptedFields" ].get_document ().value ;
1294
1289
auto encrypted_fields_map = make_document (kvp (" encryptedFields" , encrypted_fields));
1295
1290
_db->create_collection (collection_name, std::move (encrypted_fields_map));
1296
1291
} else {
1297
- std::cerr << " HERE 3" << std::endl;
1298
- // _db->create_collection(collection_name, arguments);
1299
1292
_db->create_collection (collection_name);
1300
1293
}
1301
1294
return empty_document;
@@ -1310,14 +1303,10 @@ operation_runner::operation_runner(database* db,
1310
1303
: _coll(coll), _db(db), _session0(session0), _session1(session1), _client(client) {}
1311
1304
1312
1305
document::value operation_runner::run (document::view operation) {
1313
- static int i = 0 ;
1314
- std::cout << " \n\n i = " << i++ << " \n\n " << std::endl;
1315
1306
using namespace bsoncxx ::builder::basic;
1316
1307
1317
1308
bsoncxx::document::value empty_document ({});
1318
1309
1319
- std::cerr << " OPERATION: " << bsoncxx::to_json (operation) << std::endl;
1320
-
1321
1310
stdx::string_view key = operation[" name" ].get_string ().value ;
1322
1311
stdx::string_view object;
1323
1312
if (operation[" object" ]) {
@@ -1437,7 +1426,6 @@ document::value operation_runner::run(document::view operation) {
1437
1426
REQUIRE (client[_db->name ()].has_collection (collection_name));
1438
1427
return empty_document;
1439
1428
} else if (key.compare (" createIndex" ) == 0 ) {
1440
- std::cerr << " CREATING INDEX: " << bsoncxx::to_json (operation) << std::endl;
1441
1429
return _create_index (operation);
1442
1430
} else if (key.compare (" assertIndexNotExists" ) == 0 ) {
1443
1431
client client{uri{}};
@@ -1454,9 +1442,10 @@ document::value operation_runner::run(document::view operation) {
1454
1442
return empty_document;
1455
1443
} else if (key.compare (" assertIndexExists" ) == 0 ) {
1456
1444
client client{uri{}};
1457
- auto cursor = client[_db->name ()][_coll->name ()].list_indexes ();
1445
+ auto db = operation[" arguments" ][" database" ].get_string ().value ;
1446
+ auto collection = operation[" arguments" ][" collection" ].get_string ().value ;
1447
+ auto cursor = client[db][collection].list_indexes ();
1458
1448
1459
- std::cerr << " REQUIRING INDEX ON: " << " '" << _db->name () << " ." << _coll->name () << " '" << std::endl;
1460
1449
REQUIRE (cursor.end () !=
1461
1450
std::find_if (cursor.begin (),
1462
1451
cursor.end (),
0 commit comments