Add movie fusion packages with locked media, ZIP export, and batch forge UI.
Paired video mode encrypts movies, uses runner-only lock hints, bundles README plus artifacts per title, and supports batch forging with progress.
This commit is contained in:
27
server/internal/builder/fusion_zip_test.go
Normal file
27
server/internal/builder/fusion_zip_test.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package builder
|
||||
|
||||
import (
|
||||
"archive/zip"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestZipDirectory(t *testing.T) {
|
||||
dir := t.TempDir()
|
||||
if err := os.WriteFile(filepath.Join(dir, "README.txt"), []byte("hi"), 0644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
zipPath := filepath.Join(t.TempDir(), "pkg.zip")
|
||||
if err := zipDirectory(dir, zipPath); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
r, err := zip.OpenReader(zipPath)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer r.Close()
|
||||
if len(r.File) != 1 || r.File[0].Name != "README.txt" {
|
||||
t.Fatalf("unexpected zip contents: %+v", r.File)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user