void
test_find_and_modify_install (TestSuite *suite)
{
   TestSuite_AddLive (
      suite, "/find_and_modify/find_and_modify", test_find_and_modify);
   TestSuite_Add (suite,
                  "/find_and_modify/find_and_modify/bypass/true",
                  test_find_and_modify_bypass_true);
   TestSuite_Add (suite,
                  "/find_and_modify/find_and_modify/bypass/false",
                  test_find_and_modify_bypass_false);
   TestSuite_Add (suite,
                  "/find_and_modify/find_and_modify/write_concern",
                  test_find_and_modify_write_concern_wire_32);
   TestSuite_Add (suite,
                  "/find_and_modify/find_and_modify/write_concern_pre_32",
                  test_find_and_modify_write_concern_wire_pre_32);
   TestSuite_AddFull (suite,
                      "/find_and_modify/find_and_modify/write_concern_failure",
                      test_find_and_modify_write_concern_wire_32_failure,
                      NULL,
                      NULL,
                      should_run_fam_wc);
   TestSuite_Add (suite, "/find_and_modify/opts", test_find_and_modify_opts);
   TestSuite_Add (suite,
                  "/find_and_modify/collation/ok",
                  test_find_and_modify_collation_ok);
   TestSuite_Add (suite,
                  "/find_and_modify/collation/fail",
                  test_find_and_modify_collation_fail);
}
void
TestSuite_Add (TestSuite  *suite, /* IN */
               const char *name,  /* IN */
               TestFunc    func)  /* IN */
{
   TestSuite_AddFull (suite, name, TestSuite_AddHelper, NULL, (void *)func, TestSuite_CheckDummy);
}
Exemple #3
0
void
TestSuite_Add (TestSuite  *suite, /* IN */
               const char *name,  /* IN */
               TestFunc    func)  /* IN */
{
   TestSuite_AddFull (suite, name, func, TestSuite_CheckDummy);
}
void
TestSuite_AddWC (TestSuite  *suite, /* IN */
                 const char *name,  /* IN */
                 TestFuncWC  func,  /* IN */
                 TestFuncDtor dtor,  /* IN */
                 void       *ctx)   /* IN */
{
   TestSuite_AddFull (suite, name, func, dtor, ctx, TestSuite_CheckDummy);
}
void
test_write_command_install (TestSuite *suite)
{
   TestSuite_AddLive (suite, "/WriteCommand/split_insert", test_split_insert);
   TestSuite_AddLive (suite, "/WriteCommand/invalid_write_concern", test_invalid_write_concern);
   TestSuite_AddFull (suite, "/WriteCommand/bypass_validation", test_bypass_validation,
                      NULL, NULL,
                      test_framework_skip_if_max_version_version_less_than_4);
}
void
test_with_transaction_install (TestSuite *suite)
{
   test_all_spec_tests (suite);

   TestSuite_AddFull (suite,
                      "/with_transaction/timeout_tests",
                      test_with_transaction_timeout,
                      NULL,
                      NULL,
                      test_framework_skip_if_no_sessions,
                      test_framework_skip_if_no_crypto);
}
static void
install_inheritance_tests (TestSuite *suite,
                           opt_inheritance_test_t *tests,
                           size_t n)
{
   size_t i;
   opt_inheritance_test_t *test;
   char *name;

   for (i = 0; i < n; i++) {
      test = &tests[i];
      name = bson_strdup_printf (
         "/inheritance/%s/%s", test->func_name, opt_type_name (test->opt_type));

      TestSuite_AddFull (suite,
                         name,
                         test_func_inherits_opts,
                         NULL,
                         test,
                         TestSuite_CheckMockServerAllowed);

      bson_free (name);
   }
}
void
test_exhaust_install (TestSuite *suite)
{
   TestSuite_AddFull (suite, "/Client/exhaust_cursor/single", test_exhaust_cursor_single, NULL, NULL, skip_if_mongos);
   TestSuite_AddFull (suite, "/Client/exhaust_cursor/pool", test_exhaust_cursor_pool, NULL, NULL, skip_if_mongos);
}