Release / update-version (push) Has been cancelled
Release / build-frontend (push) Has been cancelled
Release / release (push) Has been cancelled
Release / sync-version-file (push) Has been cancelled
CI / shell (push) Canceled after 0s
CI / test (push) Canceled after 0s
CI / frontend (push) Canceled after 0s
CI / golangci-lint (push) Canceled after 0s
Security Scan / backend-security (push) Canceled after 0s
Security Scan / frontend-security (push) Canceled after 0s
20 lines
517 B
Go
20 lines
517 B
Go
//go:build unit
|
|
|
|
package service
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/Wei-Shaw/sub2api/internal/pkg/openai"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestCodexVersionConstants_Consistency(t *testing.T) {
|
|
require.True(t, strings.Contains(codexCLIUserAgent, openai.CodexDefaultOriginator+"/"+codexCLIVersion),
|
|
"codexCLIUserAgent must embed codexCLIVersion")
|
|
|
|
require.True(t, strings.Contains(DefaultOpenAICodexUserAgent, codexCLIVersion),
|
|
"DefaultOpenAICodexUserAgent must embed codexCLIVersion")
|
|
}
|