Skip to content

Commit

Permalink
Add unit test for storeFailedAdvisory ... fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
s-l-teichmann committed Sep 28, 2023
1 parent ecdb2cd commit 84b0cb8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/csaf_downloader/forwarder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,7 @@ func TestStoreFailedAdvisory(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer func() {
os.Chmod(dir, 0700)
os.RemoveAll(dir)
}()
defer os.RemoveAll(dir)

cfg := &config{Directory: dir}
fw := newForwarder(cfg)
Expand Down Expand Up @@ -280,4 +277,7 @@ func TestStoreFailedAdvisory(t *testing.T) {
t.Fatal("expected to fail with an error")
}

if err := os.Chmod(sha256Path, 644); err != nil {
t.Fatal(err)
}
}

0 comments on commit 84b0cb8

Please sign in to comment.