Files
Reims-Go/internal/archtest/driver_isolation_test.go
NwflowerandClaude Opus 5.5 c639682a88 refactor: remove unused functions and keep the codebase free of them
Delete functions that no product code calls, and fold "simple plus
WithOptions" pairs into the one signature callers actually use. Rename
the live macOS lifecycle functions that were labelled Legacy.

The architecture tests now share one source loader and reject functions
without a product caller and catalog messages nobody reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 20:55:03 -07:00

31 lines
715 B
Go

package archtest
import (
"strings"
"testing"
)
// externalDriverIDs are guest drivers that live in separate plugin
// repositories. The host reaches them only through the generic driver
// contract, so no host source file may name one.
var externalDriverIDs = []string{
"reims.driver.wsl",
"reims.driver.hyperv-linux",
"reims.driver.hyperv-windows",
"reims.driver.sandbox",
"reims.driver.avd",
}
func TestHostCodeNamesNoExternalDriver(t *testing.T) {
for _, s := range sources(t) {
if s.isTest() {
continue
}
for _, id := range externalDriverIDs {
if strings.Contains(s.raw, id) {
t.Errorf("%s names the external driver %q: host code must stay driver-agnostic", s.rel, id)
}
}
}
}