Skip to content

Commit

Permalink
Add small review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bjee19 committed Oct 13, 2023
1 parent 6b935fe commit 06cdadf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/mode/static/nginx/file/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,19 @@ var _ = Describe("EventHandler", func() {
When("file does not exist", func() {
It("should not error", func() {
fakeOSMgr := &filefakes.FakeOSFileManager{}
tmpDir := GinkgoT().TempDir()
mgr := file.NewManagerImpl(zap.New(), fakeOSMgr)

files := []file.File{
{
Type: file.TypeRegular,
Path: filepath.Join(tmpDir, "regular-1.conf"),
Path: "regular-1.conf",
Content: []byte("regular-1"),
},
}

Expect(mgr.ReplaceFiles(files)).ToNot(HaveOccurred())
fakeOSMgr.RemoveReturns(os.ErrNotExist)

fakeOSMgr.RemoveReturns(os.ErrNotExist)
Expect(mgr.ReplaceFiles(files)).ToNot(HaveOccurred())
})
})
Expand Down

0 comments on commit 06cdadf

Please sign in to comment.