mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-26 14:29:08 +01:00
[e2e] resolve endpoint before the proxy-peer gate to trigger DNS warm-up
This commit is contained in:
@@ -201,11 +201,13 @@ func TestProvidersMatrix(t *testing.T) {
|
|||||||
t.Cleanup(func() { _ = cl.Terminate(context.Background()) })
|
t.Cleanup(func() { _ = cl.Terminate(context.Background()) })
|
||||||
|
|
||||||
require.NoError(t, cl.WaitConnected(ctx, 90*time.Second), "client must connect to management")
|
require.NoError(t, cl.WaitConnected(ctx, 90*time.Second), "client must connect to management")
|
||||||
|
// Resolve first: the DNS lookup triggers the lazy-connection warm-up, waking
|
||||||
|
// the proxy peer so WaitProxyPeer then observes it connected.
|
||||||
|
proxyIP, err := cl.ResolveProxyIP(ctx, settings.Endpoint)
|
||||||
|
require.NoError(t, err, "resolve agent-network endpoint to proxy IP")
|
||||||
if err := cl.WaitProxyPeer(ctx, 180*time.Second); err != nil {
|
if err := cl.WaitProxyPeer(ctx, 180*time.Second); err != nil {
|
||||||
t.Fatalf("client did not see the proxy peer: %v\n=== proxy logs ===\n%s", err, px.Logs(context.Background()))
|
t.Fatalf("client did not see the proxy peer: %v\n=== proxy logs ===\n%s", err, px.Logs(context.Background()))
|
||||||
}
|
}
|
||||||
proxyIP, err := cl.ResolveProxyIP(ctx, settings.Endpoint)
|
|
||||||
require.NoError(t, err, "resolve agent-network endpoint to proxy IP")
|
|
||||||
|
|
||||||
for _, pc := range matrix {
|
for _, pc := range matrix {
|
||||||
pc := pc
|
pc := pc
|
||||||
|
|||||||
@@ -104,11 +104,13 @@ func TestProviderSkipTLSVerification(t *testing.T) {
|
|||||||
t.Cleanup(func() { _ = cl.Terminate(context.Background()) })
|
t.Cleanup(func() { _ = cl.Terminate(context.Background()) })
|
||||||
|
|
||||||
require.NoError(t, cl.WaitConnected(ctx, 90*time.Second), "client must connect to management")
|
require.NoError(t, cl.WaitConnected(ctx, 90*time.Second), "client must connect to management")
|
||||||
|
// Resolve first: the DNS lookup triggers the lazy-connection warm-up, waking
|
||||||
|
// the proxy peer so WaitProxyPeer then observes it connected.
|
||||||
|
proxyIP, err := cl.ResolveProxyIP(ctx, settings.Endpoint)
|
||||||
|
require.NoError(t, err, "resolve endpoint to proxy IP")
|
||||||
if err := cl.WaitProxyPeer(ctx, 180*time.Second); err != nil {
|
if err := cl.WaitProxyPeer(ctx, 180*time.Second); err != nil {
|
||||||
t.Fatalf("client did not see the proxy peer: %v\n=== proxy logs ===\n%s", err, px.Logs(context.Background()))
|
t.Fatalf("client did not see the proxy peer: %v\n=== proxy logs ===\n%s", err, px.Logs(context.Background()))
|
||||||
}
|
}
|
||||||
proxyIP, err := cl.ResolveProxyIP(ctx, settings.Endpoint)
|
|
||||||
require.NoError(t, err, "resolve endpoint to proxy IP")
|
|
||||||
|
|
||||||
// Positive: skip=true reaches the self-signed upstream. Retry to absorb
|
// Positive: skip=true reaches the self-signed upstream. Retry to absorb
|
||||||
// tunnel/DNS jitter on the first call; success also proves the path works.
|
// tunnel/DNS jitter on the first call; success also proves the path works.
|
||||||
|
|||||||
@@ -106,11 +106,13 @@ func TestVLLMProvider(t *testing.T) {
|
|||||||
t.Cleanup(func() { _ = cl.Terminate(context.Background()) })
|
t.Cleanup(func() { _ = cl.Terminate(context.Background()) })
|
||||||
|
|
||||||
require.NoError(t, cl.WaitConnected(ctx, 90*time.Second), "client must connect to management")
|
require.NoError(t, cl.WaitConnected(ctx, 90*time.Second), "client must connect to management")
|
||||||
|
// Resolve first: the DNS lookup triggers the lazy-connection warm-up, waking
|
||||||
|
// the proxy peer so WaitProxyPeer then observes it connected.
|
||||||
|
proxyIP, err := cl.ResolveProxyIP(ctx, settings.Endpoint)
|
||||||
|
require.NoError(t, err, "resolve endpoint to proxy IP")
|
||||||
if err := cl.WaitProxyPeer(ctx, 180*time.Second); err != nil {
|
if err := cl.WaitProxyPeer(ctx, 180*time.Second); err != nil {
|
||||||
t.Fatalf("client did not see the proxy peer: %v\n=== proxy logs ===\n%s", err, px.Logs(context.Background()))
|
t.Fatalf("client did not see the proxy peer: %v\n=== proxy logs ===\n%s", err, px.Logs(context.Background()))
|
||||||
}
|
}
|
||||||
proxyIP, err := cl.ResolveProxyIP(ctx, settings.Endpoint)
|
|
||||||
require.NoError(t, err, "resolve endpoint to proxy IP")
|
|
||||||
|
|
||||||
before, _ := srv.ListAccessLogs(ctx)
|
before, _ := srv.ListAccessLogs(ctx)
|
||||||
sessionID := "e2e-session-vllm"
|
sessionID := "e2e-session-vllm"
|
||||||
|
|||||||
Reference in New Issue
Block a user