Skip to content

Commit

Permalink
test: more verbose ulimit test error
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Steven Allen <[email protected]>
  • Loading branch information
Stebalien committed May 13, 2019
1 parent c318e34 commit f7c6863
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/ipfs/util/ulimit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ func TestManageInvalidNFds(t *testing.T) {
t.Fatal("Cannot set the IPFS_FD_MAX env variable")
}

if _, _, err := ManageFdLimit(); err == nil {
t.Errorf("ManageFdLimit should return an error")
t.Logf("setting ulimit to %d, max %d, cur %d", value, rlimit.Max, rlimit.Cur)

if changed, new, err := ManageFdLimit(); err == nil {
t.Errorf("ManageFdLimit should return an error: changed %t, new: %d", changed, new)
} else if err != nil {
flag := strings.Contains(err.Error(),
"failed to raise ulimit to IPFS_FD_MAX")
Expand Down

0 comments on commit f7c6863

Please sign in to comment.