提交记录修改internal/workbench/instance_name_test.go+3 −2看文件
| @@ -12,6 +12,7 @@ import ( | ||
| 12 | 12 | |
| 13 | 13 | "github.com/sylvinus/agent-vm/internal/cage" |
| 14 | 14 | "github.com/sylvinus/agent-vm/internal/cli" |
| 15 | 新增: "github.com/sylvinus/agent-vm/internal/paths" | |
| 15 | 16 | "github.com/sylvinus/agent-vm/internal/vmname" |
| 16 | 17 | ) |
| 17 | 18 | |
| @@ -80,8 +81,8 @@ func TestControllerNamesMatchCLIForIndependentProfiles(t *testing.T) { | ||
| 80 | 81 | t.Errorf("SSH target %s; CLI name %s", got, want) |
| 81 | 82 | return |
| 82 | 83 | } |
| 83 | 删除: if got := filepath.Base(s.instanceDir()); got != want { | |
| 84 | 删除: t.Errorf("instance directory %s; CLI name %s", got, want) | |
| 84 | 新增: if got, wantDir := s.instanceDir(), filepath.Join(s.profile, "state", "lima", want); !paths.Equal(paths.Host(filepath.Clean(got)), paths.Host(wantDir)) { | |
| 85 | 新增: t.Errorf("instance directory %s; expected profile-owned directory %s", got, wantDir) | |
| 85 | 86 | return |
| 86 | 87 | } |
| 87 | 88 | } |

