feat: model selection at spawn (POST /api/spawn model -> LVMH_MODEL -> bridge createAgentSession); ops prepare resets ops session (fresh context per prepare)
This commit is contained in:
+28
-1
@@ -495,7 +495,7 @@ func TestSpawnerSecretsBinds(t *testing.T) {
|
||||
sec := t.TempDir()
|
||||
t.Setenv(envSecretsDir, sec)
|
||||
|
||||
res, err := sp.Start(context.Background(), "group/project", "")
|
||||
res, err := sp.Start(context.Background(), "group/project", "", "")
|
||||
if err != nil {
|
||||
t.Fatalf("Start: %v", err)
|
||||
}
|
||||
@@ -518,3 +518,30 @@ func TestSpawnerSecretsBinds(t *testing.T) {
|
||||
t.Fatalf("secrets binds missing: %v", binds)
|
||||
}
|
||||
}
|
||||
|
||||
func TestWorkerBindsCaches(t *testing.T) {
|
||||
useFakeGit(t, fakeGitModeOK)
|
||||
f := newFakeDocker()
|
||||
sp, _ := newTestSpawner(t, f)
|
||||
t.Setenv(envPlaywrightCacheDir, "/host/pw")
|
||||
t.Setenv(envCloakCacheDir, "/host/cb")
|
||||
|
||||
res, err := sp.Start(context.Background(), "group/project", "", "")
|
||||
if err != nil {
|
||||
t.Fatalf("Start: %v", err)
|
||||
}
|
||||
waitJobState(t, sp, res.SessionID, stateRunning)
|
||||
creates := f.createsByName("lvmh-agent-")
|
||||
binds := creates[0].HostConfig.Binds
|
||||
for _, want := range []string{"/host/pw:/pw-browsers:ro", "/host/cb:/cloakbrowser-cache:ro"} {
|
||||
ok := false
|
||||
for _, b := range binds {
|
||||
if b == want {
|
||||
ok = true
|
||||
}
|
||||
}
|
||||
if !ok {
|
||||
t.Fatalf("bind %s missing from %v", want, binds)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user