(t *testing.T)
| 302 | assertGitStatus(t, repo.mountPath, map[string]string{ |
| 303 | "packages/wrangler/bin/run.sh -> packages/wrangler-renamed/bin/run.sh": "R ", |
| 304 | "packages/wrangler/manifest-link -> packages/wrangler-renamed/manifest-link": "R ", |
| 305 | "packages/wrangler/nested/deep/config.json -> packages/wrangler-renamed/nested/deep/config.json": "R ", |
| 306 | "packages/wrangler/package.json -> packages/wrangler-renamed/package.json": "R ", |
| 307 | "packages/wrangler/src/index.js -> packages/wrangler-renamed/src/index.js": "R ", |
| 308 | }) |
| 309 | |
| 310 | gitCmd(t, repo.mountPath, |
| 311 | "-c", "user.name=E2E Test", |
| 312 | "-c", "user.email=e2e@test", |
| 313 | "commit", "-m", "rename tracked directory", |
| 314 | ) |
| 315 | waitForHeadAndStatus(t, repo.mountPath, previousHead, map[string]string{}) |
| 316 | waitForOverlayClean(t, repo) |
| 317 | assertPathMissing(t, filepath.Join(repo.mountPath, "packages", "wrangler")) |
| 318 | if got := readFileStr(t, renamedManifest); !strings.Contains(got, `"name":"wrangler"`) { |
| 319 | t.Fatalf("renamed package manifest after reconcile = %q", got) |
| 320 | } |
| 321 | assertPathExists(t, filepath.Join(renamedRoot, "nested", "deep", "config.json")) |
| 322 | assertPathExists(t, filepath.Join(renamedRoot, "bin", "run.sh")) |
| 323 | } |
| 324 | |
| 325 | func TestE2EGitCheckoutBranchSwitch(t *testing.T) { |
| 326 | repo := newMountedE2ERepo(t) |
| 327 | |
| 328 | mainReadme := readFileEventually(t, filepath.Join(repo.mountPath, "README.md")) |
| 329 | gitCmd(t, repo.mountPath, "checkout", "-b", "feature") |
| 330 | if err := os.WriteFile(filepath.Join(repo.mountPath, "README.md"), []byte(mainReadme+"feature branch line\n"), 0o644); err != nil { |
nothing calls this directly
no test coverage detected