Skip to content

Commit

Permalink
silence logger during tests
Browse files Browse the repository at this point in the history
  • Loading branch information
svenfuchs committed Oct 30, 2020
1 parent 1bd661b commit fe54a69
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/travis/yml/configs/model/repos.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def []=(slug, repo)
end

def fetch(slug, provider)
logger.info "Get Repo for #{slug} #{provider}"
logger.info "Get Repo for #{slug} #{provider}" unless ENV['ENV'] == 'test'
Travis::Repo.new(slug, provider).fetch
end

Expand Down
2 changes: 1 addition & 1 deletion lib/travis/yml/remote_vcs/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def http_options

def request(method, name)
resp = connection.send(method) { |req| yield(req) }
logger.info("RemoteVcs response #{resp.inspect}")
logger.info("RemoteVcs response #{resp.inspect}") unless ENV['ENV'] == 'test'
JSON.parse(resp.body)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/travis/yml/remote_vcs/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Yml
module RemoteVcs
class Repository < Client
def content(id:, path:, ref:)
logger.info("RemoteVcs Repository #{id}, #{path}")
logger.info("RemoteVcs Repository #{id}, #{path}") unless ENV['ENV'] == 'test'
request(:get, __method__) do |req|
req.url "repos/#{id}/contents/#{path}"
req.params['ref'] = ref
Expand Down

0 comments on commit fe54a69

Please sign in to comment.