Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ jobs:
ACCEPTANCE_ENABLE_VECTOR: ${{ vars.ACCEPTANCE_ENABLE_VECTOR }}
ACCEPTANCE_ENABLE_VERSIONING: ${{ vars.ACCEPTANCE_ENABLE_VERSIONING }}
ACCEPTANCE_ENABLE_WIRE: ${{ vars.ACCEPTANCE_ENABLE_WIRE }}
ACCEPTANCE_IMGPROXY_DEVELOPMENT_ERRORS_MODE: ${{ vars.ACCEPTANCE_IMGPROXY_DEVELOPMENT_ERRORS_MODE }}
ACCEPTANCE_PROFILE: ${{ inputs.profile }}
ACCEPTANCE_REGION: ${{ vars.ACCEPTANCE_REGION || secrets.ACCEPTANCE_REGION }}
ACCEPTANCE_RESOURCE_PREFIX: ${{ vars.ACCEPTANCE_RESOURCE_PREFIX || secrets.ACCEPTANCE_RESOURCE_PREFIX }}
Expand Down
1 change: 1 addition & 0 deletions acceptance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ secrets as environment secrets.
| `ACCEPTANCE_ENABLE_CDN` | Enables CDN purge tests. Managed local runs provide a purge stub by default. |
| `ACCEPTANCE_ENABLE_USAGE_CHECKSUM` | Set to `false` to disable the managed-local usage ledger stub and its checksum checks. |
| `ACCEPTANCE_ENABLE_RENDER` | Enables image transformation tests. |
| `ACCEPTANCE_IMGPROXY_DEVELOPMENT_ERRORS_MODE` | Whether target imgproxy runs with `IMGPROXY_DEVELOPMENT_ERRORS_MODE=true`. Defaults to `true`; set to `false` when imgproxy v4 runs without dev errors so invalid HEIF probes expect `500` instead of `400`. |
| `ACCEPTANCE_ENABLE_RLS_SETUP` | Enables RLS tests; requires service, anon, authenticated keys and bucket/prefix policy resources. |
| `ACCEPTANCE_ENABLE_VECTOR` | Enables vector bucket API tests. Requires local pgvector or a configured S3 Vectors target. |
| `ACCEPTANCE_ENABLE_VERSIONING` | Enables object versioning and lifecycle configuration tests. Requires `STORAGE_VERSIONING_ENABLED=true` or the multitenant tenant's `objectVersioning` feature; lifecycle configuration also requires migration 79. |
Expand Down
23 changes: 17 additions & 6 deletions acceptance/specs/render.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,24 @@ describeAcceptance(
)
)

expect(rendered.status, rendered.bodyText).toBe(400)
expect(rendered.contentType).not.toMatch(/^image\//)
expect(JSON.parse(rendered.bodyText)).toMatchObject({
error: 'InvalidRequest',
message: 'The source image is invalid or unsupported for rendering',
statusCode: '400',
})
const payload = JSON.parse(rendered.bodyText)
if (!config.imgProxyDevelopmentErrorsMode) {
expect(rendered.status, rendered.bodyText).toBe(500)
expect(payload).toMatchObject({
code: 'InternalError',
error: 'InternalError',
message: 'Internal error',
statusCode: '500',
})
} else {
expect(rendered.status, rendered.bodyText).toBe(400)
expect(payload).toMatchObject({
error: 'InvalidRequest',
message: 'The source image is invalid or unsupported for rendering',
statusCode: '400',
})
}
} finally {
await cleanupRestResources(bucketName, [objectKey], client)
}
Expand Down
5 changes: 5 additions & 0 deletions acceptance/support/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export interface AcceptanceConfig {
capabilities: Record<AcceptanceCapability, boolean>
forcePathStyle: boolean
forwardedHost?: string
imgProxyDevelopmentErrorsMode: boolean
profile: AcceptanceProfile
region: string
resourcePrefix: string
Expand Down Expand Up @@ -197,6 +198,10 @@ function buildAcceptanceConfig(): AcceptanceConfig {
forwardedHost: optionalTrim(
readOption('x-forwarded-host') ?? envOption('ACCEPTANCE_X_FORWARDED_HOST')
),
imgProxyDevelopmentErrorsMode: boolOptionDefaultTrue(
'imgproxy-development-errors-mode',
envOption('ACCEPTANCE_IMGPROXY_DEVELOPMENT_ERRORS_MODE')
),
Comment thread
ferhatelmas marked this conversation as resolved.
Resolved
Comment thread
ferhatelmas marked this conversation as resolved.
Resolved
profile,
region: readOption('region') ?? envOption('ACCEPTANCE_REGION') ?? 'us-east-1',
resourcePrefix,
Expand Down