Files
QSfera/Server/services/thumbnails/pkg/thumbnail/imgsource/cs3_test.go
T
Курнат Андрей 7135199f23
Server / deployment-config (push) Successful in 59s
Android / test-and-build (push) Failing after 1m14s
Server / vulnerability-scan (push) Failing after 8m54s
Make photo library offline-first and fix video thumbnails
2026-07-19 21:01:35 +03:00

30 lines
714 B
Go

package imgsource
import (
"context"
"testing"
)
func TestCS3AuthorizationPreservesVideoSourceMarker(t *testing.T) {
ctx := ContextSetVideoSource(context.Background(), true)
ctx = withCS3Authorization(ctx, "token")
if !contextIsVideoSource(ctx) {
t.Fatal("CS3 authorization must preserve the video source marker")
}
}
func TestDetachedVideoDownloadSurvivesCallerCancellation(t *testing.T) {
parent, cancelParent := context.WithCancel(context.Background())
download, cancelDownload := detachedVideoDownloadContext(parent)
defer cancelDownload()
cancelParent()
select {
case <-download.Done():
t.Fatal("video cache warming must continue after the requesting client disconnects")
default:
}
}