ldb: Ignore these tests in mdb test mode
authorAndrew Bartlett <abartlet@samba.org>
Tue, 6 Mar 2018 04:00:07 +0000 (17:00 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 6 Apr 2018 00:08:44 +0000 (02:08 +0200)
These are tests are specifically for when the GUID index is not in use
which is always in with ldb_mdb.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
lib/ldb/tests/ldb_mod_op_test.c

index 59fc766e91872d5d57deaee5cbd17d214a4783bb..ab5f99ad2dbf44c7eecbd0b3422fce0d6c1eb526 100644 (file)
@@ -3389,6 +3389,11 @@ static void test_ldb_unique_index_duplicate_logging(void **state)
        char *debug_string = NULL;
        char *p = NULL;
 
+       /* The non-GUID mode is not compatible with mdb */
+       if (strcmp(TEST_BE, "mdb") == 0) {
+               return;
+       }
+       
        ldb_set_debug(test_ctx->ldb, ldb_debug_string, &debug_string);
        tmp_ctx = talloc_new(test_ctx);
        assert_non_null(tmp_ctx);
@@ -3438,6 +3443,11 @@ static void test_ldb_duplicate_dn_logging(void **state)
        TALLOC_CTX *tmp_ctx;
        char *debug_string = NULL;
 
+       /* The non-GUID mode is not compatible with mdb */
+       if (strcmp(TEST_BE, "mdb") == 0) {
+               return;
+       }
+       
        ldb_set_debug(test_ctx->ldb, ldb_debug_string, &debug_string);
        tmp_ctx = talloc_new(test_ctx);
        assert_non_null(tmp_ctx);
@@ -3836,6 +3846,7 @@ int main(int argc, const char **argv)
                        test_ldb_add_to_index_unique_values_required,
                        ldb_non_unique_index_test_setup,
                        ldb_non_unique_index_test_teardown),
+               /* These tests are not compatible with mdb */
                cmocka_unit_test_setup_teardown(
                        test_ldb_unique_index_duplicate_logging,
                        ldb_unique_index_test_setup,