From f18aca9410c2221dea305fb9c4e6f0032326b4a0 Mon Sep 17 00:00:00 2001 From: Muse Date: Thu, 22 Oct 2026 13:12:14 +0000 Subject: [PATCH] =?UTF-8?q?test(agent):=20=E9=81=A5=E6=B5=8B=20AgentVersio?= =?UTF-8?q?n=20=E6=96=AD=E8=A8=80=E5=AF=B9=E9=BD=90=E7=AC=AC18=E6=9D=A1=20?= =?UTF-8?q?A=20=E7=B3=BB=E5=8F=A3=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/agent/telemetry_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/agent/telemetry_test.go b/internal/agent/telemetry_test.go index b905283..d4cc2b4 100644 --- a/internal/agent/telemetry_test.go +++ b/internal/agent/telemetry_test.go @@ -58,13 +58,14 @@ func TestChooseHostIPs(t *testing.T) { } // TestCollectTelemetryShape pins the always-on fields on any Linux host: -// the agent's own build version and a positive host uptime. Source-specific -// fields (xray version, IPs) are environment-dependent and not asserted. +// the agent's own A-series display version (item 18) and a positive host +// uptime. Source-specific fields (xray version, IPs) are +// environment-dependent and not asserted. func TestCollectTelemetryShape(t *testing.T) { a := New(&Config{MasterURL: "http://127.0.0.1:1", Token: "t", NodeName: "n"}) tel := a.collectTelemetry() - if tel.AgentVersion != config.GetBaseVersion() || tel.AgentVersion == "" { - t.Errorf("AgentVersion = %q, want config.GetBaseVersion() %q", tel.AgentVersion, config.GetBaseVersion()) + if tel.AgentVersion != config.GetAgentDisplayVersion() || tel.AgentVersion == "" { + t.Errorf("AgentVersion = %q, want config.GetAgentDisplayVersion() %q", tel.AgentVersion, config.GetAgentDisplayVersion()) } if tel.UptimeSeconds == nil || *tel.UptimeSeconds == 0 { t.Errorf("UptimeSeconds = %v, want non-nil positive", tel.UptimeSeconds)