Fix export test failures with ClearAllExportHashes for test isolation
Amp-Thread-ID: https://ampcode.com/threads/T-5335d274-44e1-4811-b63f-15c52ea3394f Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -117,6 +117,11 @@ func TestExportCommand(t *testing.T) {
|
||||
t.Run("export includes labels", func(t *testing.T) {
|
||||
exportPath := filepath.Join(tmpDir, "export_labels.jsonl")
|
||||
|
||||
// Clear export hashes to force re-export (test isolation)
|
||||
if err := s.ClearAllExportHashes(ctx); err != nil {
|
||||
t.Fatalf("Failed to clear export hashes: %v", err)
|
||||
}
|
||||
|
||||
store = s
|
||||
dbPath = testDB
|
||||
exportCmd.Flags().Set("output", exportPath)
|
||||
@@ -152,6 +157,11 @@ func TestExportCommand(t *testing.T) {
|
||||
t.Run("export includes dependencies", func(t *testing.T) {
|
||||
exportPath := filepath.Join(tmpDir, "export_deps.jsonl")
|
||||
|
||||
// Clear export hashes to force re-export (test isolation)
|
||||
if err := s.ClearAllExportHashes(ctx); err != nil {
|
||||
t.Fatalf("Failed to clear export hashes: %v", err)
|
||||
}
|
||||
|
||||
store = s
|
||||
dbPath = testDB
|
||||
exportCmd.Flags().Set("output", exportPath)
|
||||
|
||||
Reference in New Issue
Block a user