Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

test fixes

- fix log_test when run with: sudo -E go test

- fix helper.NewTestProcess BuildBin path

Change-Id: I7249ebdeb955df5bd3b17720bb6e947a86c5d98e
  • Loading branch information...
commit 8d200b9bc821633de723814b10b52f7eecd44ade 1 parent 68e7789
Doug MacEachern dougm authored
Showing with 3 additions and 4 deletions.
  1. +2 −3 log_test.go
  2. +1 −1  test/helper/helper.go
5 log_test.go
View
@@ -75,9 +75,8 @@ func (s *LogSuite) TestLogFile(c *C) {
err = config.Close()
c.Check(err, IsNil)
- // make log file read-only and check Init returns an error
- err = os.Chmod(config.FileName, 0444)
- c.Check(err, IsNil)
+ // check Init returns an error when file create fails
+ config.FileName = "/dev/null/gonnafail"
err = config.Init()
c.Check(err, NotNil)
}
2  test/helper/helper.go
View
@@ -193,7 +193,7 @@ func NewTestProcess(name string, flags []string, detached bool) *Process {
if goprocess == "" {
// binary used for the majority of tests
goprocess = path.Dir(os.Args[0]) + "/goprocess"
- err := BuildBin("/test/process", goprocess)
+ err := BuildBin("test/process", goprocess)
if err != nil {
log.Fatal(err)
}
Please sign in to comment.
Something went wrong with that request. Please try again.