Skip to content

Commit

Permalink
Add coverage for Write + Sync
Browse files Browse the repository at this point in the history
  • Loading branch information
prashantv committed Apr 11, 2020
1 parent ee180f3 commit ad1d358
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions zapcore/increase_level_test.go
Expand Up @@ -102,11 +102,15 @@ func TestIncreaseLevel(t *testing.T) {
if l >= tt.increaseLevel {
assert.True(t, enabled, "expect %v to be enabled", l)
assert.NotNil(t, ce, "expect non-nil Check")
ce.Write()
} else {
assert.False(t, enabled, "expect %v to be disabled", l)
assert.Nil(t, ce, "expect nil Check")
}
}

// Verify Sync method doesn't fail.
require.NoError(t, filteredLogger.Sync())
})
}
}

0 comments on commit ad1d358

Please sign in to comment.