Testing
Unit tests
go test -short ./...
Full test suite
go test ./...
Integration tests
go test -v ./tests/integration
Manual smoke tests
The release-focused manual checks should cover:
audio:transcodewith HLS + downloads + waveform enabledvideo:previewwithgifvideo:previewwithwebpvideo:transcodewithencrypt=true
For the full setup of BASE_URL, API_KEY, buckets, and secrets used by these smoke tests, see Configuration.
If you prefer to drive these checks through the docs-branch Python helpers instead of raw curl, see Manual Local Testing Toolkit.
Suggested smoke-test flow
audio:transcode
BASE_URL='http://localhost:3000'
API_KEY='replace-with-api-key'
curl -s \
-X POST "$BASE_URL/api/audio/jobs" \
-H 'Content-Type: application/json' \
-H "X-API-Key: $API_KEY" \
-d '{
"source": {
"hash": "smoke-audio-job",
"key": "uploads/sample.flac"
},
"pipeline": {
"package": {
"hls": {
"enabled": true,
"profile": "stream_aac_standard"
}
},
"downloads": [
{"profile": "download_mp3_high"},
{"profile": "download_flac_standard"}
],
"waveform": {
"enabled": true,
"profile": "waveform_standard",
"bins": 2048
}
}
}'
video:preview with gif
BASE_URL='http://localhost:3000'
API_KEY='replace-with-api-key'
curl -s \
-X POST "$BASE_URL/api/video/jobs" \
-H 'Content-Type: application/json' \
-H "X-API-Key: $API_KEY" \
-d '{
"source": {
"hash": "smoke-preview-gif",
"key": "uploads/sample.mp4"
},
"pipeline": {
"preview": {
"enabled": true,
"start_sec": 1,
"duration": 3,
"width": 480,
"fps": 12,
"format": "gif"
}
}
}'
video:preview with webp
Repeat the same flow with format set to webp, then confirm that results.format and the output key match.
video:transcode with encrypt=true
curl -s \
-X POST "$BASE_URL/api/video/jobs" \
-H 'Content-Type: application/json' \
-H "X-API-Key: $API_KEY" \
-d '{
"source": {
"hash": "smoke-transcode-encrypted",
"key": "uploads/sample.mp4"
},
"pipeline": {
"package": {
"hls": {
"enabled": true,
"profile": "stream_video_standard",
"encryption": {
"enabled": true
}
}
}
}
}'
After completion, confirm at least:
results.streaming.encrypted == trueresults.streaming.master_playlistexistsresults.encryption.scheme == "cbcs"- a variant playlist contains
#EXT-X-KEY /api/key/{id}returns401without a token and 16 bytes with a valid token
Recently validated scenarios
- portrait HLS ladder playback
- playlist
RESOLUTIONalignment with API results - CBCS key delivery semantics for
401,403, and200 - preview output generation for
gifandwebp
Test data and fixtures
- unit tests are mainly under
internal/.../*_test.go - integration tests are mainly under
tests/integration - shared test helpers are mainly under
tests/testutil
Release gate
Before shipping, confirm:
go test ./...passes- non-encrypted HLS output plays correctly
- encrypted playback returns
#EXT-X-KEYand enforces key authorization - preview jobs generate the expected artifacts
If you also validate observability, run the smoke-test flow together with the Observability Jaeger checklist so you confirm that HTTP and worker spans are connected.