Publish Docker image (Multi-arch) / Build & push (amd64) (push) Failing after 9m20s
Release (Linux, macOS, Windows) / Linux Release (push) Failing after 55m7s
Publish Docker image (Multi-arch) / Build & push (arm64) (push) Canceled after 0s
Release (Linux, macOS, Windows) / macOS Release (push) Canceled after 0s
Release (Linux, macOS, Windows) / Windows Release (push) Canceled after 0s
Publish Docker image (Multi-arch) / Create multi-arch manifests (push) Canceled after 0s
19 lines
467 B
Go
19 lines
467 B
Go
package relay
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestGetTaskPlatformPriority(t *testing.T) {
|
|
c, _ := gin.CreateTestContext(nil)
|
|
c.Set("platform", "fallback")
|
|
assert.Equal(t, "fallback", string(GetTaskPlatform(c)))
|
|
c.Set("channel_type", 59)
|
|
assert.Equal(t, "59", string(GetTaskPlatform(c)))
|
|
c.Set("task_plugin_key", "document-parser")
|
|
assert.Equal(t, "document-parser", string(GetTaskPlatform(c)))
|
|
}
|