Files
Luminary/internal/prediction/models_test.go
T
renjue 8e82a23555
CI / docker (push) Successful in 2m49s
Split ingress keys into text/image protocols with Replicate model listing.
Add model input defaults (including prompt), workflow model editing, and ingress API docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 23:40:27 +08:00

28 lines
728 B
Go

package prediction
import (
"testing"
"github.com/rose_cat707/luminary/internal/model"
)
func TestSplitOwnerName(t *testing.T) {
owner, name := splitOwnerName("luminary/flux-sdxl", "comfy-local")
if owner != "luminary" || name != "flux-sdxl" {
t.Fatalf("got %q/%q", owner, name)
}
owner, name = splitOwnerName("plain-model", "")
if owner != "luminary" || name != "plain-model" {
t.Fatalf("got %q/%q", owner, name)
}
}
func TestModelDescription(t *testing.T) {
if modelDescription(model.ModelEntry{WorkflowType: model.WorkflowImg2Img}) == "" {
t.Fatal("expected default img2img description")
}
if got := modelDescription(model.ModelEntry{DisplayName: "FLUX"}); got != "FLUX" {
t.Fatalf("got %q", got)
}
}