Skip to content

Commit

Permalink
Ensure pid file reader works on Windows
Browse files Browse the repository at this point in the history
[#151709987]
  • Loading branch information
williammartin committed Oct 30, 2017
1 parent a0d37e2 commit 8cd3aee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rundmc/pidreader/pid_file_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ var _ = Describe("PidFileReader", func() {
Expect(err).NotTo(HaveOccurred())

pidFilePath = pidFile.Name()
Expect(pidFile.Close()).To(Succeed())
})

AfterEach(func() {
Expand Down Expand Up @@ -112,9 +113,7 @@ var _ = Describe("PidFileReader", func() {

Context("when the pid file is empty", func() {
JustBeforeEach(func() {
f, err := os.OpenFile(pidFilePath, os.O_TRUNC, 0766)
Expect(err).NotTo(HaveOccurred())
Expect(f.Close()).To(Succeed())
Expect(os.Truncate(pidFilePath, 0)).To(Succeed())
})

Context("and it is eventually populated", func() {
Expand Down

0 comments on commit 8cd3aee

Please sign in to comment.