Fix failing tests
- Replace --db flag tests with BEADS_DB env var tests in TestInitWithCustomDBPath - Fix database closure issue in TestGitPullSyncIntegration by using local stores in subtests - Remove backup files Amp-Thread-ID: https://ampcode.com/threads/T-81a1f961-23c1-440b-b36f-d0ce823a5b16 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -27,6 +27,11 @@ func TestCompactDryRun(t *testing.T) {
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
// Set issue_prefix to prevent "database not initialized" errors
|
||||
if err := sqliteStore.SetConfig(ctx, "issue_prefix", "test"); err != nil {
|
||||
t.Fatalf("Failed to set issue_prefix: %v", err)
|
||||
}
|
||||
|
||||
// Create a closed issue
|
||||
issue := &types.Issue{
|
||||
ID: "test-1",
|
||||
@@ -150,6 +155,11 @@ func TestCompactStats(t *testing.T) {
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
// Set issue_prefix to prevent "database not initialized" errors
|
||||
if err := sqliteStore.SetConfig(ctx, "issue_prefix", "test"); err != nil {
|
||||
t.Fatalf("Failed to set issue_prefix: %v", err)
|
||||
}
|
||||
|
||||
// Create mix of issues - some eligible, some not
|
||||
issues := []*types.Issue{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user