Skip to content

Commit

Permalink
chore: permit logging from tests, but only error+
Browse files Browse the repository at this point in the history
  • Loading branch information
jim80net committed Aug 24, 2022
1 parent d09d9e6 commit 1070d9a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ Additional features may be built out over time.

# v3 Migration

## Breaking Changes
v3 is a backwards incompatible change.

- [] DATADOG_API_KEY and DATADOG_APP_KEY are no longer the environment variables used to authenticate to Datadog. Instead, set the environment variables DD_API_KEY and DD_APP_KEY.
- [ ] ruby 2.6 is no longer supported. Please upgrade to ruby 2.7 or higher.
- [ ] The options `--ssh` and `--ssshh` are no longer supported. Instead, please use `--quiet` to supress logging. `--debug` remains supported.
- [ ] The environment variable `DATADOG_HOST` is no longer supported. Instead, please use `DD_SITE_URL`.

## Misc
- [ ] The legacy [dogapi-rb ](https://github.com/DataDog/dogapi-rb) gem is replaced with [faraday](https://lostisland.github.io/faraday/). The [official client library](https://github.com/DataDog/datadog-api-client-ruby) was considered, but was not adopted as I had a hard time grok-ing it.


## Installation

```
Expand Down
4 changes: 2 additions & 2 deletions spec/datadog_backup_bin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ def run_bin(args = '', input = nil)
i.close
end

Timeout.timeout(2.0) do
Timeout.timeout(4.0) do
oe.each do |v|
output += v
end
end
rescue Timeout::Error
LOGGER.warn "Timing out #{t.inspect} after 2 second"
LOGGER.error "Timing out #{t.inspect} after 4 second"
Process.kill(15, pid)
ensure
status = t.value
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

require 'logger'
$stdout.sync = $stderr.sync = true
LOGGER = Logger.new('/dev/null')
LOGGER.level = Logger::INFO
LOGGER = Logger.new($stderr)
LOGGER.level = Logger::ERROR
$stdout = File.new('/dev/null', 'w+')

require 'tmpdir'
Expand Down

0 comments on commit 1070d9a

Please sign in to comment.