Files
descrybe/apps/api/internal/processing/pipeline_language_scope_test.go
T

24 lines
632 B
Go
Raw Normal View History

2026-10-20 17:50:32 +02:00
package processing
import (
"os"
"strings"
"testing"
)
// Source regressions enforce the job/worker language contract without a database.
func TestJobWorkerLanguageSelectionWiring(t *testing.T) {
source, err := os.ReadFile("pipeline.go")
if err != nil {
t.Fatal(err)
}
body := string(source)
for _, fragment := range []string{
"processing_language", "jobCache.contentLanguages = []string{processingLanguage}",
"jobCache.processingLanguage = processingLanguage", "cache.processingLanguage != language",
} {
if !strings.Contains(body, fragment) {
t.Errorf("missing language worker wiring %q", fragment)
}
}
}