daemon: drop worker models.json bind (host-path bind of container path was invalid; image bakes it)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user