Files
LocalAI/tests/e2e/distributed/cluster/options_test.go
Ettore Di Giacinto ceacb22adb fix(distributed): prove agent worker credentials
Keep pending agent workers alive with authenticated heartbeats while preserving approval as the tunnel and execution boundary. Exercise the real binary credential handoff through an authenticated inference and verify that credential remains non-admin.

Assisted-by: Codex:GPT-5 [apply_patch] [exec_command]
2026-09-20 03:05:35 +00:00

31 lines
938 B
Go

package cluster
import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
var _ = Describe("Cluster process environment", func() {
It("changes staging limits only for conformance workers", func() {
Expect(workerStagingEnv(Options{}, "/worker")).To(BeEmpty())
Expect(workerStagingEnv(Options{ConformanceStaging: true}, "/worker")).To(Equal([]string{
"LOCALAI_EPHEMERAL_STAGING_BYTE_LIMIT=1073741824",
"LOCALAI_EPHEMERAL_STAGING_MIN_FREE_BYTES=1",
"LOCALAI_MOCK_EXPECT_STAGING_ROOT=/worker",
}))
})
It("sets authenticated deployment controls explicitly", func() {
Expect(authenticatedDeploymentEnv(Options{})).To(Equal([]string{
"LOCALAI_AUTO_APPROVE_NODES=true",
}))
Expect(authenticatedDeploymentEnv(Options{
RequireNodeApproval: true,
DistributedRequireAuth: true,
})).To(Equal([]string{
"LOCALAI_AUTO_APPROVE_NODES=false",
"LOCALAI_DISTRIBUTED_REQUIRE_AUTH=true",
}))
})
})