This removes ::InspecPlugins::TestFixture in installer_test and
loader_test on every test.
Please... no more output in our test runs...
Signed-off-by: Ryan Davis <zenspider@chef.io>
ProfileContext#to_resources_dsl is the only usage of it.
The responsibility for this code should be on ProfileContext.
Refactored a majority of #create_dsl to be a 2-line long Module.new
instead of 36 lines. Much less magic. Still has an anonymous module
but it is now much easier to address and debug.
Signed-off-by: Ryan Davis <zenspider@chef.io>
Everyone now has an `inspec` method, but the AWS ones still return
nil as their backend hasn't been set up.
This seems wrong...
Signed-off-by: Ryan Davis <zenspider@chef.io>
This also removes Inspec::ResourceBehaviors and Inspec::ResourceDSL.
All class methods look like class methods.
All instance methods look like instance methods.
There is still too much clever going on with __register creating
another anonymous subclass, but I think I can work that out/down too.
Signed-off-by: Ryan Davis <zenspider@chef.io>
+ State normal path first.
+ Use Enumerable to state your logic up front, don't build it into
loops with breaks/returns.
+ Remove nonsensical duplication of key formats. (should push up or remove)
+ Had to add an extra test case that wasn't covered here but was in
metadata_test.rb (why?!?)
Signed-off-by: Ryan Davis <zenspider@chef.io>
Now discovers the first available conf file from a list of known
paths. Might have to expand based on various distros.
Had to tweak the tests because the mock loader mocks EVERYTHING every
time. :/
Signed-off-by: Ryan Davis <zenspider@chef.io>
* Merged CEC.create args into CEC#initialize
* Converted the only call site of CEC.create to just call new.
* Added profile_context and resources_dsl accessors to CEC.
Signed-off-by: Ryan Davis <zenspider@chef.io>
Per auditctl(8), the -a option can have either list,action or
action,list. This PR matches against valid actions for the action field
and passed the remainder off to the list field.
Closes#4664
Signed-off-by: Trevor Vaughan <tvaughan@onyxpoint.com>
This does NOT include fixes for our dependencies that are also having
2.7 warnings (which cause our functional tests to fail because for
some reason we expect stderr to be empty, which is brittle).
I've got upstream PRs to fix all of those. My tests pass locally. I
could push a commit that modifies the Gemfile to use my forks, but I'd
like to see how this fares for now.
Signed-off-by: Ryan Davis <zenspider@chef.io>