Split ingress keys into text/image protocols with Replicate model listing.
CI / docker (push) Successful in 3m38s
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>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package model
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestIngressKeyEffectiveProtocol(t *testing.T) {
|
||||
if (IngressKey{}).EffectiveProtocol() != IngressProtocolText {
|
||||
t.Fatal("empty protocol should default to text")
|
||||
}
|
||||
k := IngressKey{Protocol: IngressProtocolImage}
|
||||
if k.EffectiveProtocol() != IngressProtocolImage {
|
||||
t.Fatal("expected image protocol")
|
||||
}
|
||||
}
|
||||
|
||||
func TestIngressKeyProtocolValid(t *testing.T) {
|
||||
if !IngressProtocolText.Valid() || !IngressProtocolImage.Valid() {
|
||||
t.Fatal("text and image should be valid")
|
||||
}
|
||||
if IngressKeyProtocol("other").Valid() {
|
||||
t.Fatal("unexpected valid protocol")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user