diff --git a/examples/configs/scylla-db-config.yaml b/examples/configs/scylla-db-config.yaml index b0d0ad5..e2a6788 100644 --- a/examples/configs/scylla-db-config.yaml +++ b/examples/configs/scylla-db-config.yaml @@ -21,7 +21,7 @@ buckets: # # cache: null # Use the global cache handler. - mode: realtime # Optimise images as and when they're required then store them. + mode: aot # Optimise images as and when they're required then store them. formats: png: true # Disable PNG encoding. jpeg: true # Enable JPEG encoding. diff --git a/src/tests.rs b/src/tests.rs index e3196eb..8bf5177 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -80,7 +80,7 @@ async fn validate_image_content( async fn test_basic_aot_upload_retrieval_without_guessing() -> anyhow::Result<()> { let app = setup_environment(AOT_CONFIG).await?; - let res = app.post("/v1/images/user-profiles") + let res = app.post("/v1/user-profiles") .body(TEST_IMAGE) .content_type("application/octet-stream".to_string()) .typed_header(headers::ContentLength(TEST_IMAGE.len() as u64)) @@ -97,7 +97,7 @@ async fn test_basic_aot_upload_retrieval_without_guessing() -> anyhow::Result<() .get("image_id") .string(); - let res = app.get(format!("/v1/images/user-profiles/{}", file_id)) + let res = app.get(format!("/v1/user-profiles/{}", file_id)) .send() .await; @@ -113,7 +113,7 @@ async fn test_basic_aot_upload_retrieval_without_guessing() -> anyhow::Result<() async fn test_basic_aot_upload_retrieval_with_guessing() -> anyhow::Result<()> { let app = setup_environment(AOT_CONFIG).await?; - let res = app.post("/v1/images/user-profiles") + let res = app.post("/v1/user-profiles") .body(TEST_IMAGE) .content_type("application/octet-stream".to_string()) .typed_header(headers::ContentLength(TEST_IMAGE.len() as u64)) @@ -130,7 +130,7 @@ async fn test_basic_aot_upload_retrieval_with_guessing() -> anyhow::Result<()> { .get("image_id") .string(); - let res = app.get(format!("/v1/images/user-profiles/{}", file_id)) + let res = app.get(format!("/v1/user-profiles/{}", file_id)) .send() .await; diff --git a/tests/configs/aot-mode.yaml b/tests/configs/aot-mode.yaml index 6a15a13..cb2b815 100644 --- a/tests/configs/aot-mode.yaml +++ b/tests/configs/aot-mode.yaml @@ -2,7 +2,6 @@ backend: filesystem: # Use the filesystem backend. directory: "data" -base_serving_path: "/images" # Serve buckets out of `/images` global_cache: max_images: 1000 # At most cache 1000 images. max_capacity: 500 # 500MB max capacity. @@ -10,7 +9,7 @@ global_cache: buckets: user-profiles: # Define a bucket called "user-profiles", this is accessable out of `/images/user-profiles`. mode: aot # Optimise images as and when they're required then store them. - formats: + formats: png: true # Enable PNG encoding. jpeg: true # Enable JPEG encoding. webp: true # Enable WebP encoding. @@ -23,11 +22,11 @@ buckets: default_serving_format: webp # Serve the WebP format by default. default_serving_preset: medium-square # Use the "medium-square" sizing preset by default. - + presets: medium-square: # Define a new resizing preset. width: 500 # 500px height: 500 # 500px - cache: null # Use the global cache handler. - + cache: null # Use the global cache handler. +