Merge origin/main, fix test git init for modern git
This commit is contained in:
@@ -91,8 +91,12 @@ func testFreshCloneAutoImport(t *testing.T) {
|
||||
|
||||
// Test checkGitForIssues detects issues.jsonl
|
||||
t.Chdir(dir)
|
||||
|
||||
git.ResetCaches() // Reset git caches after changing directory
|
||||
|
||||
git.ResetCaches()
|
||||
|
||||
|
||||
count, path, gitRef := checkGitForIssues()
|
||||
if count != 1 {
|
||||
t.Errorf("Expected 1 issue in git, got %d", count)
|
||||
@@ -171,8 +175,12 @@ func testDatabaseRemovalScenario(t *testing.T) {
|
||||
|
||||
// Change to test directory
|
||||
t.Chdir(dir)
|
||||
|
||||
git.ResetCaches() // Reset git caches after changing directory
|
||||
|
||||
git.ResetCaches()
|
||||
|
||||
|
||||
// Test checkGitForIssues finds issues.jsonl (canonical name)
|
||||
count, path, gitRef := checkGitForIssues()
|
||||
if count != 2 {
|
||||
@@ -250,8 +258,12 @@ func testLegacyFilenameSupport(t *testing.T) {
|
||||
|
||||
// Change to test directory
|
||||
t.Chdir(dir)
|
||||
|
||||
git.ResetCaches() // Reset git caches after changing directory
|
||||
|
||||
git.ResetCaches()
|
||||
|
||||
|
||||
// Test checkGitForIssues finds issues.jsonl
|
||||
count, path, gitRef := checkGitForIssues()
|
||||
if count != 1 {
|
||||
@@ -327,8 +339,12 @@ func testPrecedenceTest(t *testing.T) {
|
||||
|
||||
// Change to test directory
|
||||
t.Chdir(dir)
|
||||
|
||||
git.ResetCaches() // Reset git caches after changing directory
|
||||
|
||||
git.ResetCaches()
|
||||
|
||||
|
||||
// Test checkGitForIssues prefers issues.jsonl
|
||||
count, path, _ := checkGitForIssues()
|
||||
if count != 2 {
|
||||
@@ -374,8 +390,12 @@ func testInitSafetyCheck(t *testing.T) {
|
||||
|
||||
// Change to test directory
|
||||
t.Chdir(dir)
|
||||
|
||||
git.ResetCaches() // Reset git caches after changing directory
|
||||
|
||||
git.ResetCaches()
|
||||
|
||||
|
||||
// Create empty database (simulating failed import)
|
||||
dbPath := filepath.Join(beadsDir, "test.db")
|
||||
store, err := sqlite.New(context.Background(), dbPath)
|
||||
|
||||
Reference in New Issue
Block a user