Skip to content

Commit

Permalink
feat: Removed redundant tmp directory deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
werniq committed Sep 8, 2024
1 parent 7a5d070 commit 3649826
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions news_fetcher/fetch_news_job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"gogator/cmd/parsers"
"gogator/cmd/types"
"os"
"path/filepath"
"testing"
"time"
)
Expand Down Expand Up @@ -69,17 +68,6 @@ func TestFetchingJob_Execute(t *testing.T) {
if err != nil {
t.Fatalf("failed to create temp directory: %v", err)
}
defer func(path string) {
time.Sleep(time.Second * 5)
err := os.Remove(filepath.Join(path, time.Now().Format(time.DateOnly)+".json"))
if err != nil {
t.Fatalf("failed to remove data file: %v", err)
}
err = os.RemoveAll(path)
if err != nil {
t.Fatalf("failed to remove temp directory: %v", err)
}
}(tempDir)

testCases := []struct {
name string
Expand Down

0 comments on commit 3649826

Please sign in to comment.