daemon: drop worker models.json bind (host-path bind of container path was invalid; image bakes it)

This commit is contained in:
Raphael Westphal
2026-08-18 15:49:37 +02:00
parent b5d267e61e
commit 7a7a130a1a
3 changed files with 0 additions and 39 deletions
-30
View File
@@ -276,36 +276,6 @@ func TestSpawnerCloneURLInjectsPAT(t *testing.T) {
}
}
func TestSpawnerModelsBindWhenPresent(t *testing.T) {
useFakeGit(t, fakeGitModeOK)
f := newFakeDocker()
sp, _ := newTestSpawner(t, f)
models := filepath.Join(t.TempDir(), "models.json")
if err := os.WriteFile(models, []byte("{}"), 0o644); err != nil {
t.Fatalf("write models: %v", err)
}
sp.modelsPath = models
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-")
if len(creates) != 1 {
t.Fatalf("creates = %d", len(creates))
}
roFound := false
for _, b := range creates[0].HostConfig.Binds {
if b == models+":"+modelsMountTarget+":ro" {
roFound = true
}
}
if !roFound {
t.Fatalf("models read-only bind missing: %v", creates[0].HostConfig.Binds)
}
}
func TestSpawnerRemoveSession(t *testing.T) {
useFakeGit(t, fakeGitModeOK)
f := newFakeDocker()