mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
res_ari: Add http prefix to generated docs
updated the uri handler to include the url prefix of the http server this enables res_ari to add it to the uris when generating docs Change-Id: I279335a2625261a8492206c37219698f42591c2e
This commit is contained in:
committed by
Joshua Colp
parent
455bc78901
commit
6f448f32fe
@@ -217,7 +217,7 @@ AST_TEST_DEFINE(get_docs)
|
||||
|
||||
response = response_alloc();
|
||||
headers = ast_variable_new("Host", "stasis.asterisk.org", __FILE__);
|
||||
ast_ari_get_docs("resources.json", headers, response);
|
||||
ast_ari_get_docs("resources.json", "", headers, response);
|
||||
ast_test_validate(test, 200 == response->response_code);
|
||||
|
||||
/* basePath should be relative to the Host header */
|
||||
@@ -247,7 +247,7 @@ AST_TEST_DEFINE(get_docs_nohost)
|
||||
}
|
||||
|
||||
response = response_alloc();
|
||||
ast_ari_get_docs("resources.json", headers, response);
|
||||
ast_ari_get_docs("resources.json", "", headers, response);
|
||||
ast_test_validate(test, 200 == response->response_code);
|
||||
|
||||
/* basePath should be relative to the Host header */
|
||||
@@ -274,7 +274,7 @@ AST_TEST_DEFINE(get_docs_notfound)
|
||||
}
|
||||
|
||||
response = response_alloc();
|
||||
ast_ari_get_docs("i-am-not-a-resource.json", headers, response);
|
||||
ast_ari_get_docs("i-am-not-a-resource.json", "", headers, response);
|
||||
ast_test_validate(test, 404 == response->response_code);
|
||||
|
||||
return AST_TEST_PASS;
|
||||
@@ -297,7 +297,7 @@ AST_TEST_DEFINE(get_docs_hackerz)
|
||||
}
|
||||
|
||||
response = response_alloc();
|
||||
ast_ari_get_docs("../../../../sbin/asterisk", headers, response);
|
||||
ast_ari_get_docs("../../../../sbin/asterisk", "", headers, response);
|
||||
ast_test_validate(test, 404 == response->response_code);
|
||||
|
||||
return AST_TEST_PASS;
|
||||
|
Reference in New Issue
Block a user