初始化
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package media
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
func TestAssetKeysUseControlledSegments(t *testing.T) {
|
||||
projectID, assetID, taskID, mediaID := uuid.New(), uuid.New(), uuid.New(), uuid.New()
|
||||
key := AssetOutput(projectID, "角色 中文", assetID, taskID, mediaID, "image/webp")
|
||||
wantPrefix := "juyou_ran/video-redraw/projects/" + projectID.String() + "/assets/custom/" + assetID.String() + "/outputs/"
|
||||
if !strings.HasPrefix(key, wantPrefix) || !strings.HasSuffix(key, ".webp") {
|
||||
t.Fatalf("unexpected key: %s", key)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user