From: Ralph Boehme Date: Thu, 2 Oct 2025 15:08:55 +0000 (+0200) Subject: mdssvc: fix running test command manually X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8791c0cad4fb03606ea484c2da7ee69d9de5d48;p=thirdparty%2Fsamba.git mdssvc: fix running test command manually BUG: https://bugzilla.samba.org/show_bug.cgi?id=15927 Signed-off-by: Ralph Boehme Reviewed-by: Volker Lendecke --- diff --git a/source3/rpc_server/mdssvc/test_mdsparser_es.c b/source3/rpc_server/mdssvc/test_mdsparser_es.c index 02270a9b066..8fc011220a4 100644 --- a/source3/rpc_server/mdssvc/test_mdsparser_es.c +++ b/source3/rpc_server/mdssvc/test_mdsparser_es.c @@ -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);