]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
mdssvc: fix running test command manually
authorRalph Boehme <slow@samba.org>
Thu, 2 Oct 2025 15:08:55 +0000 (17:08 +0200)
committerJule Anger <janger@samba.org>
Wed, 15 Oct 2025 14:01:05 +0000 (14:01 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15927

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit a8791c0cad4fb03606ea484c2da7ee69d9de5d48)

source3/rpc_server/mdssvc/test_mdsparser_es.c

index 02270a9b0662e82237c899693d9176a691ee6ce9..8fc011220a444188a0d214c8f18f483a9519377b 100644 (file)
@@ -200,16 +200,23 @@ static void test_mdsparser_es(void **state)
        TALLOC_CTX *frame = talloc_stackframe();
        const char *path_scope = "/foo/bar";
        char *es_query = NULL;
+       char *default_path = NULL;
        const char *path = NULL;
        json_t *mappings = NULL;
        json_error_t json_error;
        int i;
        bool ok;
 
+       default_path = talloc_asprintf(
+               frame,
+               "%s/mdssvc/elasticsearch_mappings.json",
+               get_dyn_SAMBA_DATADIR());
+       assert_non_null(default_path);
+
        path = lp_parm_const_string(GLOBAL_SECTION_SNUM,
                                    "elasticsearch",
                                    "mappings",
-                                   NULL);
+                                   default_path);
        assert_non_null(path);
 
        mappings = json_load_file(path, 0, &json_error);