Update config and lifecycle test to use API prefix
This adds an API prefix to the three config files, and updates the hard-coded URLs in the lifecycle test to use the new API root. The change doesn't affect the unit or integration test suites, as neither of these set an API prefix. Most of the required updates are likely to be in the web app, which I've not yet touched.
This commit is contained in:
parent
acdc88e870
commit
9851485057
4 changed files with 5 additions and 2 deletions
|
|
@ -26,6 +26,7 @@
|
|||
"bg_channel_deviations_luv": "openflexure_microscope_server.things.background_detect:ChannelDeviationLUV"
|
||||
},
|
||||
"settings_folder": "/var/openflexure/settings/",
|
||||
"api_prefix": "/api/v3",
|
||||
"application_config": {
|
||||
"log_folder": "/var/openflexure/logs/",
|
||||
"data_folder": "/var/openflexure/data/"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
"system": "openflexure_microscope_server.things.system:OpenFlexureSystem"
|
||||
},
|
||||
"settings_folder": "./openflexure/settings/",
|
||||
"api_prefix": "/api/v3",
|
||||
"application_config": {
|
||||
"log_folder": "./openflexure/logs/",
|
||||
"data_folder": "./openflexure/data/"
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
"bg_channel_deviations_luv": "openflexure_microscope_server.things.background_detect:ChannelDeviationLUV"
|
||||
},
|
||||
"settings_folder": "./openflexure/settings/",
|
||||
"api_prefix": "/api/v3",
|
||||
"application_config": {
|
||||
"log_folder": "./openflexure/logs/",
|
||||
"data_folder": "./openflexure/data/"
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ def main() -> None:
|
|||
def test_client_connection() -> None:
|
||||
"""Check a ThingClient can interact with the simulation microscope camera."""
|
||||
print("Connecting Python client to microscope, and capturing image")
|
||||
cam_client = lt.ThingClient.from_url("http://localhost:5000/camera/")
|
||||
cam_client = lt.ThingClient.from_url("http://localhost:5000/api/v3/camera/")
|
||||
img = Image.open(cam_client.grab_jpeg().open())
|
||||
print(f"Successfully grabbed image of size {img.size}")
|
||||
assert img.size == (820, 616)
|
||||
|
|
@ -95,7 +95,7 @@ def subscribe_to_mjpeg_stream() -> subprocess.Popen:
|
|||
"nohup",
|
||||
"curl",
|
||||
"-s",
|
||||
"http://localhost:5000/camera/mjpeg_stream",
|
||||
"http://localhost:5000/api/v3/camera/mjpeg_stream",
|
||||
">",
|
||||
"/dev/null",
|
||||
"2>&1",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue