321683f863
CI / docker (push) Successful in 3m38s
Add model input defaults (including prompt), workflow model editing, ingress API docs, and fix img2img image upload filenames for signed URLs. Co-authored-by: Cursor <cursoragent@cursor.com>
28 lines
728 B
Go
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)
|
|
}
|
|
}
|