Validate registration retry intervals.

Reject register-only configs that leave the shared retry interval at the
zero value so failed registration attempts cannot spin in a tight loop.
Cover the regression in tests and make the register-only integration test
explicit about its retry interval.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Harivansh Rathi 2026-04-01 14:52:37 +00:00
parent 273af4b0ab
commit 48a05fda1c
3 changed files with 32 additions and 8 deletions

View file

@ -458,14 +458,15 @@ func TestAppRegistersWithoutControlPlaneTokenWhenUnset(t *testing.T) {
exportPath := filepath.Join(t.TempDir(), "export")
_, stop := startTestApp(t, Config{
Port: "0",
ExportPath: exportPath,
MachineID: "nas-no-token",
DisplayName: "No Token NAS",
AgentVersion: "test-version",
ExportLabel: "register-only",
ControlPlaneURL: controlPlane.URL,
RegisterEnabled: true,
Port: "0",
ExportPath: exportPath,
MachineID: "nas-no-token",
DisplayName: "No Token NAS",
AgentVersion: "test-version",
ExportLabel: "register-only",
ControlPlaneURL: controlPlane.URL,
RegisterEnabled: true,
HeartbeatInterval: time.Second,
})
defer stop()