Fix goconst linter issues (bd-116)

- Use windowsOS constant in reinit_test.go
- Use testIssueBD1 constant in compact_test.go and counter_sync_test.go
- Merged duplicate bd-126 into bd-116
This commit is contained in:
Steve Yegge
2025-10-25 18:04:05 -07:00
parent 37e5dcf4f8
commit 14e14f647e
4 changed files with 6 additions and 6 deletions

View File

@@ -17,7 +17,7 @@ func TestGetTier1Candidates(t *testing.T) {
// Create test issues
// Old closed issue (eligible)
issue1 := &types.Issue{
ID: "bd-1",
ID: testIssueBD1,
Title: "Old closed issue",
Description: "This is a test description",
Status: "closed",
@@ -91,7 +91,7 @@ func TestGetTier1Candidates(t *testing.T) {
t.Errorf("Expected 1 candidate, got %d", len(candidates))
}
if len(candidates) > 0 && candidates[0].IssueID != "bd-1" {
if len(candidates) > 0 && candidates[0].IssueID != testIssueBD1 {
t.Errorf("Expected candidate bd-1, got %s", candidates[0].IssueID)
}
}
@@ -145,7 +145,7 @@ func TestGetTier2Candidates(t *testing.T) {
t.Errorf("Expected 1 candidate, got %d", len(candidates))
}
if len(candidates) > 0 && candidates[0].IssueID != "bd-1" {
if len(candidates) > 0 && candidates[0].IssueID != testIssueBD1 {
t.Errorf("Expected candidate bd-1, got %s", candidates[0].IssueID)
}
}

View File

@@ -221,7 +221,7 @@ func TestCounterSyncAfterDeleteAll(t *testing.T) {
if err := store.CreateIssue(ctx, newIssue, "test"); err != nil {
t.Fatalf("Failed to create new issue: %v", err)
}
if newIssue.ID != "bd-1" {
if newIssue.ID != testIssueBD1 {
t.Errorf("Expected new issue to be bd-1, got %s", newIssue.ID)
}
}