Show More
@@ -67,3 +67,12 b' class TestGetServerInfo(object):' | |||
|
67 | 67 | expected['server'] = resp['result']['server'] |
|
68 | 68 | |
|
69 | 69 | assert_ok(id_, expected, given=response.body) |
|
70 | ||
|
71 | def test_api_get_server_info_data_for_search_index_build(self): | |
|
72 | id_, params = build_data(self.apikey, 'get_server_info') | |
|
73 | response = api_call(self.app, params) | |
|
74 | resp = response.json | |
|
75 | ||
|
76 | # required by indexer | |
|
77 | assert resp['result']['index_storage'] | |
|
78 | assert resp['result']['storage'] |
@@ -60,7 +60,13 b' def get_server_info(request, apiuser):' | |||
|
60 | 60 | if not has_superadmin_permission(apiuser): |
|
61 | 61 | raise JSONRPCForbidden() |
|
62 | 62 | |
|
63 |
re |
|
|
63 | server_info = ScmModel().get_server_info(request.environ) | |
|
64 | # rhodecode-index requires those | |
|
65 | ||
|
66 | server_info['index_storage'] = server_info['search']['value']['location'] | |
|
67 | server_info['storage'] = server_info['storage']['value']['path'] | |
|
68 | ||
|
69 | return server_info | |
|
64 | 70 | |
|
65 | 71 | |
|
66 | 72 | @jsonrpc_method() |
General Comments 0
You need to be logged in to leave comments.
Login now