fetch_ml/internal/api/ws_jobs_args_test.go
Jeremie Fraeys a4e2ecdbe6
refactor: co-locate api, audit, auth tests with source code
Move unit tests from tests/unit/ to internal/ following Go conventions:
- tests/unit/api/* -> internal/api/* (WebSocket handlers, helpers, duplicate detection)
- tests/unit/audit/* -> internal/audit/* (alert, sealed, verifier tests)
- tests/unit/auth/* -> internal/auth/* (API key, keychain, user manager)
- tests/unit/crypto/kms/* -> internal/auth/kms/* (cache, protocol tests)

Update import paths in test files to reflect new locations.

Benefits:
- Tests live alongside the code they test
- Easier navigation and maintenance
- Clearer package boundaries
- Follows standard Go project layout
2026-03-12 16:34:54 -04:00

20 lines
632 B
Go

//nolint:revive // Package name 'api' is appropriate for this test package
package api_test
import (
"testing"
wspkg "github.com/jfraeys/fetch_ml/internal/api/ws"
)
func TestWSHandlerNewQueueOpcodeExists(t *testing.T) {
if wspkg.OpcodeQueueJobWithNote != 0x1B {
t.Fatalf("expected OpcodeQueueJobWithNote to be 0x1B, got %d", wspkg.OpcodeQueueJobWithNote)
}
if wspkg.OpcodeAnnotateRun != 0x1C {
t.Fatalf("expected OpcodeAnnotateRun to be 0x1C, got %d", wspkg.OpcodeAnnotateRun)
}
if wspkg.OpcodeSetRunNarrative != 0x1D {
t.Fatalf("expected OpcodeSetRunNarrative to be 0x1D, got %d", wspkg.OpcodeSetRunNarrative)
}
}