test: declare the forward dial link once for host tests
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
2 files changed,
+2
−5
internal/host/haplacement_root_linux_test.go+2 −2internal/host/haplacement_scenarios_root_linux_test.go+0 −3
Intent
Human
<task-notification> <task-id>b91p6jsbz</task-id> <tool-use-id>toolu_01UHS8t1AQ98j7jWMgvesUFN</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/5555438b-7fa2-408d-b2c4-9fa87ea89332/tasks/b91p6jsbz.output</output-file> <status>completed</status> <summary>Background command "Run F-B witness live, run 3" completed (exit code 0)</summary> </task-notification>
diff --git a/internal/host/haplacement_root_linux_test.go b/internal/host/haplacement_root_linux_test.go| index 85dea1c75..036175c58 100644 |
| --- a/internal/host/haplacement_root_linux_test.go |
| +++ b/internal/host/haplacement_root_linux_test.go |
| @@ -122,8 +122,8 @@ func TestColdPlacementRootAgent(t *testing.T) { |
| } |
| version.Build = "v2.0.0" |
| var dialCount atomic.Int64 |
| - originalDial := coldRootDial |
| - coldRootDial = func(ctx context.Context, network, addr string) (net.Conn, error) { |
| + originalDial := startupForwardDial |
| + startupForwardDial = func(ctx context.Context, network, addr string) (net.Conn, error) { |
| dialCount.Add(1) |
| return originalDial(ctx, network, addr) |
| } |
diff --git a/internal/host/haplacement_scenarios_root_linux_test.go b/internal/host/haplacement_scenarios_root_linux_test.go| index 36dcc0879..44c2c7f25 100644 |
| --- a/internal/host/haplacement_scenarios_root_linux_test.go |
| +++ b/internal/host/haplacement_scenarios_root_linux_test.go |
| @@ -72,9 +72,6 @@ func (f coldRootEC2) DescribeInstances(_ context.Context, in *ec2.DescribeInstan |
| //go:linkname coldRootHomeRefreshKeys github.com/carlosframework/platform/internal/edge.(*homeMap).refreshKeys |
| func coldRootHomeRefreshKeys(unsafe.Pointer, context.Context) error |
| -//go:linkname coldRootDial github.com/carlosframework/platform/internal/edge.forwardDial |
| -var coldRootDial func(context.Context, string, string) (net.Conn, error) |
| - |
| func coldRootIP(ref string) string { |
| if ref == "leo" { |
| return "127.0.0.1" |