Better categorize test coverage results

Also marks a few things as uncovered, and removes an unused class.
This commit is contained in:
Robert Speicher 2017-08-10 19:09:14 -04:00
parent 69eb4be7ec
commit d0622b79d8
6 changed files with 25 additions and 26 deletions

View file

@ -1,12 +1,14 @@
# :nocov:
if Rails.env.test?
class UnicornTestController < ActionController::Base
def pid
render plain: Process.pid.to_s
end
def kill
Process.kill(params[:signal], Process.pid)
render plain: 'Bye!'
end
end
end
# :nocov:

View file

@ -1,16 +0,0 @@
class FileStreamer #:nodoc:
attr_reader :to_path
def initialize(path)
@to_path = path
end
# Stream the file's contents if Rack::Sendfile isn't present.
def each
File.open(to_path, 'rb') do |file|
while chunk = file.read(16384)
yield chunk
end
end
end
end

View file

@ -1,6 +1,7 @@
# This Rack middleware is intended to proxy the webpack assets directory to the
# webpack-dev-server. It is only intended for use in development.
# :nocov:
module Gitlab
module Middleware
class WebpackProxy < Rack::Proxy
@ -22,3 +23,4 @@ module Gitlab
end
end
end
# :nocov:

View file

@ -1,3 +1,4 @@
# :nocov:
module Gitlab
module OAuth
module Session
@ -15,3 +16,4 @@ module Gitlab
end
end
end
# :nocov:

View file

@ -1,3 +1,4 @@
# :nocov:
module DeliverNever
def deliver_later
self
@ -21,3 +22,4 @@ module Gitlab
end
end
end
# :nocov:

View file

@ -36,18 +36,25 @@ module SimpleCovEnv
track_files '{app,lib}/**/*.rb'
add_filter '/vendor/ruby/'
add_filter 'app/controllers/sherlock/'
add_filter 'config/initializers/'
add_filter 'db/fixtures/'
add_filter 'lib/gitlab/sidekiq_middleware/'
add_filter 'lib/system_check/'
add_group 'Controllers', 'app/controllers'
add_group 'Models', 'app/models'
add_group 'Mailers', 'app/mailers'
add_group 'Helpers', 'app/helpers'
add_group 'Workers', %w(app/jobs app/workers)
add_group 'Libraries', 'lib'
add_group 'Services', 'app/services'
add_group 'Finders', 'app/finders'
add_group 'Uploaders', 'app/uploaders'
add_group 'Validators', 'app/validators'
add_group 'Finders', 'app/finders'
add_group 'Helpers', 'app/helpers'
add_group 'Libraries', 'lib'
add_group 'Mailers', 'app/mailers'
add_group 'Models', 'app/models'
add_group 'Policies', 'app/policies'
add_group 'Presenters', 'app/presenters'
add_group 'Serializers', 'app/serializers'
add_group 'Services', 'app/services'
add_group 'Uploaders', 'app/uploaders'
add_group 'Validators', 'app/validators'
add_group 'Workers', %w(app/jobs app/workers)
merge_timeout 365.days
end