Temporarily amend tests

This commit is contained in:
Harrison Burt 2022-03-30 23:54:21 +01:00
parent 6ac90d5253
commit 05cf8dad12
3 changed files with 9 additions and 10 deletions

View File

@ -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.

View File

@ -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;

View File

@ -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.