- Introduced unit tests for the main package to ensure compilation. - Added tests for the manager, including validation of upload sessions and handling of Blender binary paths. - Implemented tests for job token generation and validation, ensuring security and integrity. - Created tests for configuration management and database schema to verify functionality. - Added tests for logger and runner components to enhance overall test coverage and reliability.
24 lines
492 B
Go
24 lines
492 B
Go
package api
|
|
|
|
import (
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
func TestResolveBlenderBinaryPath_WithPathComponent(t *testing.T) {
|
|
got, err := resolveBlenderBinaryPath("./blender")
|
|
if err != nil {
|
|
t.Fatalf("resolveBlenderBinaryPath failed: %v", err)
|
|
}
|
|
if !filepath.IsAbs(got) {
|
|
t.Fatalf("expected absolute path, got %q", got)
|
|
}
|
|
}
|
|
|
|
func TestResolveBlenderBinaryPath_Empty(t *testing.T) {
|
|
if _, err := resolveBlenderBinaryPath(""); err == nil {
|
|
t.Fatal("expected error for empty path")
|
|
}
|
|
}
|
|
|