@@ -423,8 +423,7 @@ test_insert_check_keys (void)
423
423
ASSERT_ERROR_CONTAINS (error ,
424
424
MONGOC_ERROR_COMMAND ,
425
425
MONGOC_ERROR_COMMAND_INVALID_ARG ,
426
- "document to insert contains invalid key: keys "
427
- "cannot begin with \"$\": \"$dollar\"" );
426
+ "keys cannot begin with \"$\": \"$dollar\"" );
428
427
429
428
BSON_ASSERT (bson_empty (& reply ));
430
429
@@ -442,8 +441,7 @@ test_insert_check_keys (void)
442
441
ASSERT_ERROR_CONTAINS (error ,
443
442
MONGOC_ERROR_COMMAND ,
444
443
MONGOC_ERROR_COMMAND_INVALID_ARG ,
445
- "document to insert contains invalid key: keys "
446
- "cannot begin with \"$\": \"$dollar\"" );
444
+ "keys cannot begin with \"$\": \"$dollar\"" );
447
445
448
446
BSON_ASSERT (bson_empty (& reply ));
449
447
@@ -460,8 +458,7 @@ test_insert_check_keys (void)
460
458
ASSERT_ERROR_CONTAINS (error ,
461
459
MONGOC_ERROR_COMMAND ,
462
460
MONGOC_ERROR_COMMAND_INVALID_ARG ,
463
- "document to insert contains invalid key: keys "
464
- "cannot contain \".\": \"a.b\"" );
461
+ "keys cannot contain \".\": \"a.b\"" );
465
462
466
463
BSON_ASSERT (bson_empty (& reply ));
467
464
@@ -890,8 +887,7 @@ _test_replace_one_check_keys (bool with_opts)
890
887
ASSERT_ERROR_CONTAINS (error ,
891
888
MONGOC_ERROR_COMMAND ,
892
889
MONGOC_ERROR_COMMAND_INVALID_ARG ,
893
- "replacement document contains invalid key: keys "
894
- "cannot begin with \"$\": \"$a\"" );
890
+ "keys cannot begin with \"$\": \"$a\"" );
895
891
896
892
r = (bool ) mongoc_bulk_operation_execute (bulk , & reply , & error );
897
893
ASSERT (!r );
@@ -910,8 +906,7 @@ _test_replace_one_check_keys (bool with_opts)
910
906
ASSERT_ERROR_CONTAINS (error ,
911
907
MONGOC_ERROR_COMMAND ,
912
908
MONGOC_ERROR_COMMAND_INVALID_ARG ,
913
- "replacement document contains invalid key: keys "
914
- "cannot begin with \"$\": \"$a\"" );
909
+ "keys cannot begin with \"$\": \"$a\"" );
915
910
}
916
911
917
912
ASSERT (bson_empty (& reply ));
@@ -1450,8 +1445,7 @@ _test_replace_one_invalid (bool first)
1450
1445
test .update = mongoc_bulk_operation_replace_one ;
1451
1446
test .update_with_opts = NULL ;
1452
1447
test .invalid_first = first ;
1453
- test .error_message = "replacement document contains invalid key: keys "
1454
- "cannot begin with \"$\": \"$set\"" ;
1448
+ test .error_message = "keys cannot begin with \"$\": \"$set\"" ;
1455
1449
1456
1450
_test_update_validate (& test );
1457
1451
}
@@ -1466,8 +1460,7 @@ _test_replace_one_with_opts_invalid (bool first)
1466
1460
test .update = NULL ;
1467
1461
test .update_with_opts = mongoc_bulk_operation_replace_one_with_opts ;
1468
1462
test .invalid_first = first ;
1469
- test .error_message = "replacement document contains invalid key: keys "
1470
- "cannot begin with \"$\": \"$set\"" ;
1463
+ test .error_message = "keys cannot begin with \"$\": \"$set\"" ;
1471
1464
1472
1465
_test_update_validate (& test );
1473
1466
}
@@ -1568,8 +1561,7 @@ _test_insert_invalid (bool with_opts, bool invalid_first)
1568
1561
bson_t reply ;
1569
1562
bson_error_t error ;
1570
1563
bool r ;
1571
- const char * err = "document to insert contains invalid key: keys cannot "
1572
- "contain \".\": \"a.b\"" ;
1564
+ const char * err = "keys cannot contain \".\": \"a.b\"" ;
1573
1565
1574
1566
client = test_framework_client_new ();
1575
1567
collection = get_test_collection (client , "test_insert_validate" );
@@ -1725,7 +1717,7 @@ _test_remove_validate (remove_validate_test_t *test)
1725
1717
MONGOC_ERROR_COMMAND ,
1726
1718
MONGOC_ERROR_COMMAND_INVALID_ARG ,
1727
1719
"Bulk operation is invalid from prior error: "
1728
- "document to insert contains invalid key : keys "
1720
+ "invalid document for insert: keys "
1729
1721
"cannot begin with \"$\": \"$a\"" );
1730
1722
} else {
1731
1723
test -> remove (bulk , tmp_bson (NULL ));
@@ -1741,7 +1733,7 @@ _test_remove_validate (remove_validate_test_t *test)
1741
1733
ASSERT_ERROR_CONTAINS (error ,
1742
1734
MONGOC_ERROR_COMMAND ,
1743
1735
MONGOC_ERROR_COMMAND_INVALID_ARG ,
1744
- "document to insert contains invalid key : keys "
1736
+ "invalid document for insert: keys "
1745
1737
"cannot begin with \"$\": \"$a\"" );
1746
1738
1747
1739
bson_destroy (& reply );
0 commit comments