mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 07:17:17 +00:00
fix: correct url for update requests in remote-call trigger
This commit is contained in:
parent
2760b36977
commit
f2f6f6df70
@ -81,7 +81,7 @@ class RemoteCall(Report):
|
||||
bool: True in case if remote process is alive and False otherwise
|
||||
"""
|
||||
try:
|
||||
response = self.client.make_request("GET", f"/api/v1/service/process/{process_id}")
|
||||
response = self.client.make_request("GET", f"{self.client.address}/api/v1/service/process/{process_id}")
|
||||
except requests.HTTPError as ex:
|
||||
status_code = ex.response.status_code if ex.response is not None else None
|
||||
if status_code == 404:
|
||||
@ -100,7 +100,7 @@ class RemoteCall(Report):
|
||||
Returns:
|
||||
str: remote process id
|
||||
"""
|
||||
response = self.client.make_request("POST", "/api/v1/service/update",
|
||||
response = self.client.make_request("POST", f"{self.client.address}/api/v1/service/update",
|
||||
params=self.repository_id.query(),
|
||||
json={
|
||||
"aur": self.update_aur,
|
||||
|
@ -30,7 +30,7 @@ def test_is_process_alive(remote_call: RemoteCall, mocker: MockerFixture) -> Non
|
||||
request_mock = mocker.patch("ahriman.core.status.web_client.WebClient.make_request", return_value=response_obj)
|
||||
|
||||
assert remote_call.is_process_alive("id")
|
||||
request_mock.assert_called_once_with("GET", "/api/v1/service/process/id")
|
||||
request_mock.assert_called_once_with("GET", f"{remote_call.client.address}/api/v1/service/process/id")
|
||||
|
||||
|
||||
def test_is_process_alive_unknown(remote_call: RemoteCall, mocker: MockerFixture) -> None:
|
||||
@ -79,7 +79,7 @@ def test_remote_update(remote_call: RemoteCall, mocker: MockerFixture) -> None:
|
||||
request_mock = mocker.patch("ahriman.core.status.web_client.WebClient.make_request", return_value=response_obj)
|
||||
|
||||
assert remote_call.remote_update() == "id"
|
||||
request_mock.assert_called_once_with("POST", "/api/v1/service/update",
|
||||
request_mock.assert_called_once_with("POST", f"{remote_call.client.address}/api/v1/service/update",
|
||||
params=remote_call.repository_id.query(),
|
||||
json={
|
||||
"aur": False,
|
||||
|
Loading…
Reference in New Issue
Block a user