mirror of
https://github.com/inspec/inspec
synced 2024-11-22 20:53:11 +00:00
Get all non-resource tests fixed again.
Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
parent
de8258c9f7
commit
9ec91484fc
12 changed files with 23 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
require 'helper'
|
||||
require 'inspec-supermarket/api'
|
||||
require 'bundles/inspec-supermarket/api'
|
||||
|
||||
def default_url?(supermarket_url)
|
||||
supermarket_url == Supermarket::API::SUPERMARKET_URL
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
require 'helper'
|
||||
require 'inspec/config'
|
||||
require 'inspec/runner_mock'
|
||||
require 'fetchers/mock'
|
||||
|
||||
describe 'controls' do
|
||||
def load(content)
|
||||
|
@ -8,7 +10,11 @@ describe 'controls' do
|
|||
'inspec.yml' => "name: mock",
|
||||
'controls/mock.rb' => "control '1' do\n#{content}\nend\n",
|
||||
}
|
||||
opts = { test_collector: Inspec::RunnerMock.new, backend: Inspec::Backend.create(Inspec::Config.mock) }
|
||||
opts = {
|
||||
test_collector: Inspec::RunnerMock.new,
|
||||
backend: Inspec::Backend.create(Inspec::Config.mock)
|
||||
}
|
||||
|
||||
Inspec::Profile.for_target(data, opts)
|
||||
.params[:controls]['1']
|
||||
end
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
require 'helper'
|
||||
require 'inspec/runner_mock'
|
||||
require 'inspec/runner'
|
||||
|
||||
describe 'inspec keyword' do
|
||||
def load(content)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
require 'helper'
|
||||
require 'fetchers/mock'
|
||||
|
||||
describe Fetchers::Mock do
|
||||
let(:fetcher) { Fetchers::Mock }
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# copyright: 2017, Chef Software Inc.
|
||||
|
||||
require 'helper'
|
||||
require 'inspec/impact'
|
||||
|
||||
describe 'Impact' do
|
||||
let(:impact) { Inspec::Impact }
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
require 'helper'
|
||||
require 'inspec/profile_context'
|
||||
require 'inspec/runner_mock'
|
||||
|
||||
describe 'resource exception' do
|
||||
let(:profile) do
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
|
||||
require 'helper'
|
||||
require 'inspec/profile_context'
|
||||
require 'inspec/runner_mock'
|
||||
require 'inspec/resource'
|
||||
require 'inspec/resources/command'
|
||||
|
||||
|
||||
describe Inspec::Profile do
|
||||
let(:logger) { Minitest::Mock.new }
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
require 'helper'
|
||||
require 'inspec/secrets'
|
||||
require 'inspec/runner'
|
||||
|
||||
describe Inspec::Runner do
|
||||
let(:runner) { Inspec::Runner.new({ command_runner: :generic }) }
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
require 'helper'
|
||||
require 'inspec/utils/parser'
|
||||
|
||||
describe BsdMountParser do
|
||||
let (:parser) { Class.new() { include BsdMountParser }.new }
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
require 'helper'
|
||||
require 'utils/find_files'
|
||||
require 'inspec/utils/find_files'
|
||||
require 'inspec/resources/command'
|
||||
|
||||
|
||||
describe FindFiles do
|
||||
let (:helper) do
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
require 'helper'
|
||||
require 'inspec/utils/parser'
|
||||
|
||||
describe PasswdParser do
|
||||
let (:parser) { Class.new() { include PasswdParser }.new }
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
require 'helper'
|
||||
require 'inspec/utils/parser'
|
||||
|
||||
describe SolarisNetstatParser do
|
||||
let (:parser) { Class.new() { include SolarisNetstatParser }.new }
|
||||
|
|
Loading…
Reference in a new issue