inspec 0.9.9 → 0.9.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -2
- data/README.md +5 -1
- data/bin/os +23 -0
- data/examples/kitchen-ansible/.kitchen/default-centos-71.yml +6 -0
- data/examples/kitchen-ansible/.kitchen/default-ubuntu-1204.yml +6 -0
- data/examples/kitchen-ansible/.kitchen/default-ubuntu-1404.yml +6 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/Vagrantfile +9 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/Vagrantfile +9 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/Vagrantfile +9 -0
- data/examples/kitchen-ansible/.kitchen/logs/default-centos-71.log +4 -0
- data/examples/kitchen-ansible/.kitchen/logs/default-ubuntu-1204.log +4 -0
- data/examples/kitchen-ansible/.kitchen/logs/default-ubuntu-1404.log +4 -0
- data/examples/kitchen-ansible/.kitchen/logs/kitchen.log +8 -0
- data/examples/kitchen-ansible/Gemfile.lock +154 -0
- data/examples/kitchen-chef/.kitchen/default-centos-71.yml +6 -0
- data/examples/kitchen-chef/.kitchen/default-ubuntu-1204.yml +6 -0
- data/examples/kitchen-chef/.kitchen/default-ubuntu-1404.yml +6 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/Vagrantfile +9 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/Vagrantfile +9 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/Vagrantfile +9 -0
- data/examples/kitchen-chef/.kitchen/logs/default-centos-71.log +4 -0
- data/examples/kitchen-chef/.kitchen/logs/default-ubuntu-1204.log +4 -0
- data/examples/kitchen-chef/.kitchen/logs/default-ubuntu-1404.log +4 -0
- data/examples/kitchen-chef/.kitchen/logs/kitchen.log +8 -0
- data/examples/kitchen-chef/Berksfile.lock +11 -0
- data/examples/kitchen-chef/Gemfile.lock +223 -0
- data/examples/kitchen-puppet/.bundle/config +2 -0
- data/examples/kitchen-puppet/.kitchen/logs/default-centos-71.log +5 -0
- data/examples/kitchen-puppet/.kitchen/logs/default-ubuntu-1204.log +5 -0
- data/examples/kitchen-puppet/.kitchen/logs/default-ubuntu-1404.log +5 -0
- data/examples/kitchen-puppet/.kitchen/logs/kitchen.log +5 -0
- data/examples/kitchen-puppet/.librarian/puppet/config +2 -0
- data/examples/kitchen-puppet/Gemfile.lock +174 -0
- data/examples/kitchen-puppet/Puppetfile.lock +2 -0
- data/examples/profile/libraries/.DS_Store +0 -0
- data/examples/test-kitchen/.kitchen/logs/default-centos-71.log +5 -0
- data/examples/test-kitchen/.kitchen/logs/default-ubuntu-1204.log +5 -0
- data/examples/test-kitchen/.kitchen/logs/default-ubuntu-1404.log +5 -0
- data/examples/test-kitchen/.kitchen/logs/kitchen.log +5 -0
- data/examples/test-kitchen/Berksfile.lock +11 -0
- data/examples/test-kitchen/Gemfile.lock +233 -0
- data/inspec.gemspec +2 -2
- data/lib/.DS_Store +0 -0
- data/lib/extras/compliance/README.md +15 -0
- data/lib/extras/compliance/compliance.rb +245 -0
- data/lib/inspec/metadata.rb +3 -1
- data/lib/inspec/profile.rb +2 -0
- data/lib/inspec/profile_context.rb +34 -63
- data/lib/inspec/resource.rb +23 -0
- data/lib/inspec/runner.rb +17 -35
- data/lib/inspec/runner_mock.rb +31 -0
- data/lib/inspec/runner_rspec.rb +94 -0
- data/lib/inspec/targets/dir.rb +2 -4
- data/lib/inspec/version.rb +1 -1
- data/{test/unit/mock/profiles/complete-meta/test/.gitkeep → lib/resources/certificate.rb} +0 -0
- data/lib/resources/command.rb +1 -1
- data/lib/resources/postgres_session.rb +10 -15
- data/{test/unit/mock/profiles/custom-resource/test/.gitkeep → lib/resources/private_key.rb} +0 -0
- data/lib/resources/registry_key.rb +10 -6
- data/lib/resources/service.rb +232 -63
- data/test/chefdk/.gitignore +16 -0
- data/test/chefdk/.kitchen.yml +27 -0
- data/test/chefdk/Policyfile.rb +16 -0
- data/test/chefdk/README.md +4 -0
- data/test/chefdk/chefignore +100 -0
- data/test/chefdk/metadata.rb +7 -0
- data/test/chefdk/recipes/default.rb +5 -0
- data/test/chefdk/spec/spec_helper.rb +2 -0
- data/test/chefdk/spec/unit/recipes/default_spec.rb +20 -0
- data/test/chefdk/test/integration/default/serverspec/default_spec.rb +9 -0
- data/test/chefdk/test/integration/helpers/serverspec/spec_helper.rb +8 -0
- data/test/docker_run.rb +5 -1
- data/test/docker_test.rb +1 -2
- data/test/helper.rb +1 -0
- data/test/integration/.kitchen/default-aws-linux.yml +4 -0
- data/test/integration/.kitchen/default-centos-7.yml +4 -0
- data/test/integration/.kitchen/default-debian-8.yml +4 -0
- data/test/integration/.kitchen/default-fedora-22.yml +4 -0
- data/test/integration/.kitchen/default-redhat-65.yml +4 -0
- data/test/integration/.kitchen/default-redhat-71.yml +4 -0
- data/test/integration/.kitchen/default-suse-11sp3.yml +4 -0
- data/test/integration/.kitchen/default-suse-12.yml +4 -0
- data/test/integration/.kitchen/default-ubuntu-1204.yml +3 -0
- data/test/integration/.kitchen/default-ubuntu-1404.yml +4 -0
- data/test/integration/.kitchen/default-windows-2012.yml +1 -0
- data/test/integration/.kitchen/default-windows-2012r2.yml +2 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67-i386/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/Vagrantfile +8 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/Vagrantfile +8 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-new-ubuntu-1404/Vagrantfile +9 -0
- data/test/{unit/mock/profiles/empty/metadata.rb → integration/.kitchen/logs/default-aws-linux.log} +0 -0
- data/test/integration/.kitchen/logs/default-centos-511-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-centos-511.log +2 -0
- data/test/integration/.kitchen/logs/default-centos-67-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-centos-67.log +2 -0
- data/test/integration/.kitchen/logs/default-centos-7.log +0 -0
- data/test/integration/.kitchen/logs/default-centos-71.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-6010-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-6010.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-78-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-78.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-8.log +0 -0
- data/test/integration/.kitchen/logs/default-debian-81-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-81.log +2 -0
- data/test/integration/.kitchen/logs/default-fedora-21-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-fedora-21.log +2 -0
- data/test/integration/.kitchen/logs/default-fedora-22.log +0 -0
- data/test/integration/.kitchen/logs/default-freebsd-102.log +2 -0
- data/test/integration/.kitchen/logs/default-freebsd-93.log +2 -0
- data/test/integration/.kitchen/logs/default-mint-172-cinnamon.log +2 -0
- data/test/integration/.kitchen/logs/default-modernIE-w10-edge.log +2 -0
- data/test/integration/.kitchen/logs/default-modernIE-w7-ie11.log +2 -0
- data/test/integration/.kitchen/logs/default-modernIE-w81-ie11.log +2 -0
- data/test/integration/.kitchen/logs/default-opensuse-132-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-opensuse-132-x86-64.log +2 -0
- data/test/integration/.kitchen/logs/default-opentable-win-2008r2-standard-amd64-nocm.log +0 -0
- data/test/integration/.kitchen/logs/default-opentable-win-2012r2-standard-amd64-nocm.log +0 -0
- data/test/integration/.kitchen/logs/default-redhat-65.log +0 -0
- data/test/integration/.kitchen/logs/default-redhat-71.log +0 -0
- data/test/integration/.kitchen/logs/default-suse-11sp3.log +0 -0
- data/test/integration/.kitchen/logs/default-suse-12.log +0 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1004-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1004.log +2 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1204-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1204.log +0 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1404-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1404.log +0 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1510.log +0 -0
- data/test/integration/.kitchen/logs/default-windows-2008-opentable.log +2 -0
- data/test/integration/.kitchen/logs/default-windows-2008.log +0 -0
- data/test/integration/.kitchen/logs/default-windows-2012.log +0 -0
- data/test/integration/.kitchen/logs/default-windows-2012R2-matt.log +2 -0
- data/test/integration/.kitchen/logs/default-windows-2012r2-opentable.log +2 -0
- data/test/integration/.kitchen/logs/default-windows-2012r2.log +41 -0
- data/test/integration/.kitchen/logs/kitchen.log +0 -0
- data/test/integration/.kitchen/logs/new-centos-511-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-centos-511.log +0 -0
- data/test/integration/.kitchen/logs/new-centos-67-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-centos-67.log +0 -0
- data/test/integration/.kitchen/logs/new-centos-71.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-6010-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-6010.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-78-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-78.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-81-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-81.log +0 -0
- data/test/integration/.kitchen/logs/new-fedora-21-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-fedora-21.log +0 -0
- data/test/integration/.kitchen/logs/new-fedora-22.log +0 -0
- data/test/integration/.kitchen/logs/new-freebsd-102.log +0 -0
- data/test/integration/.kitchen/logs/new-freebsd-93.log +0 -0
- data/test/integration/.kitchen/logs/new-opensuse-132-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-opensuse-132-x86-64.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1004-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1004.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1204-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1204.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1404-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1404.log +3 -0
- data/test/integration/.kitchen/logs/test-centos-511-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-centos-511.log +0 -0
- data/test/integration/.kitchen/logs/test-centos-67-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-centos-67.log +0 -0
- data/test/integration/.kitchen/logs/test-centos-71.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-6010-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-6010.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-78-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-78.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-81-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-81.log +0 -0
- data/test/integration/.kitchen/logs/test-fedora-21-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-fedora-21.log +0 -0
- data/test/integration/.kitchen/logs/test-fedora-22.log +0 -0
- data/test/integration/.kitchen/logs/test-freebsd-102.log +0 -0
- data/test/integration/.kitchen/logs/test-freebsd-93.log +0 -0
- data/test/integration/.kitchen/logs/test-opensuse-132-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-opensuse-132-x86-64.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1004-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1004.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1204-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1204.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1404-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1404.log +0 -0
- data/test/integration/.kitchen/new-ubuntu-1404.yml +1 -0
- data/test/integration/Berksfile +1 -0
- data/test/integration/Berksfile.lock +27 -0
- data/test/integration/TODO.md +15 -0
- data/test/integration/cookbooks/os_prepare/files/empty.iso +0 -0
- data/test/integration/cookbooks/os_prepare/metadata.rb +2 -0
- data/test/integration/cookbooks/os_prepare/recipes/_runit_service_centos.rb +34 -0
- data/test/integration/cookbooks/os_prepare/recipes/default.rb +1 -0
- data/test/integration/cookbooks/os_prepare/recipes/mount.rb +5 -5
- data/test/integration/cookbooks/os_prepare/recipes/postgres.rb +12 -0
- data/test/integration/cookbooks/os_prepare/recipes/service.rb +6 -2
- data/test/integration/cookbooks/os_prepare/templates/default/sv-default-svlog-run.erb +3 -0
- data/test/integration/test/.DS_Store +0 -0
- data/test/integration/test/integration/.DS_Store +0 -0
- data/test/integration/test/integration/default/.DS_Store +0 -0
- data/test/integration/test/integration/default/certificate_spec.rb +7 -0
- data/test/integration/test/integration/default/file_spec.rb +2 -2
- data/test/integration/test/integration/default/mount_spec.rb +1 -1
- data/test/integration/test/integration/default/postgres_session_spec.rb +9 -0
- data/test/integration/test/integration/default/service_spec.rb +34 -0
- data/test/mac/service_spec.rb +5 -0
- data/test/serverspec/.kitchen.yml +18 -0
- data/test/serverspec/.kitchen/default-ubuntu-1404.yml +6 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/Vagrantfile +9 -0
- data/test/serverspec/.kitchen/logs/default-ubuntu-1404.log +2 -0
- data/test/serverspec/.kitchen/logs/kitchen.log +3 -0
- data/test/serverspec/Berksfile +3 -0
- data/test/serverspec/Berksfile.lock +5 -0
- data/test/serverspec/TODO.md +2 -0
- data/test/serverspec/test/integration/default/serverspec/os_spec.rb +25 -0
- data/test/serverspec/test/integration/default/serverspec/spec_helper.rb +48 -0
- data/test/serverspec/test/integration/default/serverspec/sysctl_spec.rb +37 -0
- data/test/unit/metadata_test.rb +13 -1
- data/test/unit/mock/profiles/complete-metadata/inspec.yml +7 -0
- data/test/unit/mock/profiles/empty-metadata/inspec.yml +0 -0
- data/test/unit/mock/profiles/{complete-meta → legacy-complete-metadata}/metadata.rb +0 -0
- data/test/unit/mock/profiles/legacy-complete-metadata/test/.gitkeep +0 -0
- data/test/unit/mock/profiles/legacy-empty-metadata/controls/.gitkeep +0 -0
- data/test/unit/mock/profiles/legacy-empty-metadata/metadata.rb +0 -0
- data/test/unit/mock/profiles/{metadata → legacy-simple-metadata}/metadata.rb +0 -0
- data/test/unit/mock/profiles/legacy-simple-metadata/test/.gitkeep +0 -0
- data/test/unit/mock/profiles/simple-metadata/inspec.yml +1 -0
- data/test/unit/profile_test.rb +82 -31
- data/test/unit/resources/service_test.rb +67 -3
- metadata +466 -23
- data/examples/resource/controls/tiny.rb +0 -3
- data/examples/resource/inspec.yml +0 -10
- data/examples/resource/libraries/tiny.rb +0 -3
- data/lib/inspec/targets/url.rb.orig +0 -87
- data/test/unit/mock/profiles/custom-resource/libraries/resource.rb +0 -3
- data/test/unit/mock/profiles/custom-resource/metadata.rb +0 -7
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
driver:
|
3
|
+
name: vagrant
|
4
|
+
|
5
|
+
## The forwarded_port port feature lets you connect to ports on the VM guest via
|
6
|
+
## localhost on the host.
|
7
|
+
## see also: https://docs.vagrantup.com/v2/networking/forwarded_ports.html
|
8
|
+
|
9
|
+
# network:
|
10
|
+
# - ["forwarded_port", {guest: 80, host: 8080}]
|
11
|
+
|
12
|
+
provisioner:
|
13
|
+
name: policyfile_zero
|
14
|
+
|
15
|
+
## require_chef_omnibus specifies a specific chef version to install. You can
|
16
|
+
## also set this to `true` to always use the latest version.
|
17
|
+
## see also: https://docs.chef.io/config_yml_kitchen.html
|
18
|
+
|
19
|
+
# require_chef_omnibus: 12.5.0
|
20
|
+
|
21
|
+
platforms:
|
22
|
+
- name: ubuntu-14.04
|
23
|
+
- name: centos-7.1
|
24
|
+
|
25
|
+
suites:
|
26
|
+
- name: default
|
27
|
+
attributes:
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Policyfile.rb - Describe how you want Chef to build your system.
|
2
|
+
#
|
3
|
+
# For more information on the Policyfile feature, visit
|
4
|
+
# https://github.com/opscode/chef-dk/blob/master/POLICYFILE_README.md
|
5
|
+
|
6
|
+
# A name that describes what the system you're building with Chef does.
|
7
|
+
name "chefdk"
|
8
|
+
|
9
|
+
# Where to find external cookbooks:
|
10
|
+
default_source :supermarket
|
11
|
+
|
12
|
+
# run_list: chef-client will run these recipes in the order specified.
|
13
|
+
run_list "chefdk::default"
|
14
|
+
|
15
|
+
# Specify a custom source for a single cookbook:
|
16
|
+
cookbook "chefdk", path: "."
|
@@ -0,0 +1,100 @@
|
|
1
|
+
# Put files/directories that should be ignored in this file when uploading
|
2
|
+
# or sharing to the community site.
|
3
|
+
# Lines that start with '# ' are comments.
|
4
|
+
|
5
|
+
# OS generated files #
|
6
|
+
######################
|
7
|
+
.DS_Store
|
8
|
+
Icon?
|
9
|
+
nohup.out
|
10
|
+
ehthumbs.db
|
11
|
+
Thumbs.db
|
12
|
+
|
13
|
+
# SASS #
|
14
|
+
########
|
15
|
+
.sass-cache
|
16
|
+
|
17
|
+
# EDITORS #
|
18
|
+
###########
|
19
|
+
\#*
|
20
|
+
.#*
|
21
|
+
*~
|
22
|
+
*.sw[a-z]
|
23
|
+
*.bak
|
24
|
+
REVISION
|
25
|
+
TAGS*
|
26
|
+
tmtags
|
27
|
+
*_flymake.*
|
28
|
+
*_flymake
|
29
|
+
*.tmproj
|
30
|
+
.project
|
31
|
+
.settings
|
32
|
+
mkmf.log
|
33
|
+
|
34
|
+
## COMPILED ##
|
35
|
+
##############
|
36
|
+
a.out
|
37
|
+
*.o
|
38
|
+
*.pyc
|
39
|
+
*.so
|
40
|
+
*.com
|
41
|
+
*.class
|
42
|
+
*.dll
|
43
|
+
*.exe
|
44
|
+
*/rdoc/
|
45
|
+
|
46
|
+
# Testing #
|
47
|
+
###########
|
48
|
+
.watchr
|
49
|
+
.rspec
|
50
|
+
spec/*
|
51
|
+
spec/fixtures/*
|
52
|
+
test/*
|
53
|
+
features/*
|
54
|
+
examples/*
|
55
|
+
Guardfile
|
56
|
+
Procfile
|
57
|
+
.kitchen*
|
58
|
+
.rubocop.yml
|
59
|
+
|
60
|
+
# SCM #
|
61
|
+
#######
|
62
|
+
.git
|
63
|
+
*/.git
|
64
|
+
.gitignore
|
65
|
+
.gitmodules
|
66
|
+
.gitconfig
|
67
|
+
.gitattributes
|
68
|
+
.svn
|
69
|
+
*/.bzr/*
|
70
|
+
*/.hg/*
|
71
|
+
*/.svn/*
|
72
|
+
|
73
|
+
# Berkshelf #
|
74
|
+
#############
|
75
|
+
Berksfile
|
76
|
+
Berksfile.lock
|
77
|
+
cookbooks/*
|
78
|
+
tmp
|
79
|
+
|
80
|
+
# Cookbooks #
|
81
|
+
#############
|
82
|
+
CONTRIBUTING*
|
83
|
+
CHANGELOG*
|
84
|
+
TESTING*
|
85
|
+
|
86
|
+
# Strainer #
|
87
|
+
############
|
88
|
+
Colanderfile
|
89
|
+
Strainerfile
|
90
|
+
.colander
|
91
|
+
.strainer
|
92
|
+
|
93
|
+
# Vagrant #
|
94
|
+
###########
|
95
|
+
.vagrant
|
96
|
+
Vagrantfile
|
97
|
+
|
98
|
+
# Travis #
|
99
|
+
##########
|
100
|
+
.travis.yml
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: chefdk
|
3
|
+
# Spec:: default
|
4
|
+
#
|
5
|
+
# Copyright (c) 2015 The Authors, All Rights Reserved.
|
6
|
+
|
7
|
+
require 'spec_helper'
|
8
|
+
|
9
|
+
describe 'chefdk::default' do
|
10
|
+
context 'When all attributes are default, on an unspecified platform' do
|
11
|
+
let(:chef_run) do
|
12
|
+
runner = ChefSpec::ServerRunner.new
|
13
|
+
runner.converge(described_recipe)
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'converges successfully' do
|
17
|
+
expect { chef_run }.to_not raise_error
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/test/docker_run.rb
CHANGED
@@ -52,7 +52,11 @@ class DockerRunner
|
|
52
52
|
res = block.call(name, container)
|
53
53
|
# special rescue block to handle not implemented error
|
54
54
|
rescue NotImplementedError => err
|
55
|
-
|
55
|
+
stop_container(container)
|
56
|
+
raise err.message + "\n" + err.backtrace.join("\n")
|
57
|
+
rescue StandardError => err
|
58
|
+
stop_container(container)
|
59
|
+
raise err.message + "\n" + err.backtrace.join("\n")
|
56
60
|
end
|
57
61
|
# always stop the container
|
58
62
|
stop_container(container)
|
data/test/docker_test.rb
CHANGED
@@ -43,8 +43,7 @@ class DockerTester
|
|
43
43
|
opts = { 'target' => "docker://#{container.id}" }
|
44
44
|
runner = Inspec::Runner.new(opts)
|
45
45
|
runner.add_tests(@tests)
|
46
|
-
tests
|
47
|
-
tests.map { |g| g.run(report) }
|
46
|
+
runner.tests.map { |g| g.run(report) }
|
48
47
|
end
|
49
48
|
end
|
50
49
|
|
data/test/helper.rb
CHANGED
@@ -151,6 +151,7 @@ class MockLoader
|
|
151
151
|
'initctl show-config ssh' => cmd.call('initctl-show-config-ssh'),
|
152
152
|
# show ssh service Centos 7
|
153
153
|
'systemctl show --all sshd' => cmd.call('systemctl-show-all-sshd'),
|
154
|
+
'/path/to/systemctl show --all sshd' => cmd.call('systemctl-show-all-sshd'),
|
154
155
|
# services on macos
|
155
156
|
'launchctl list' => cmd.call('launchctl-list'),
|
156
157
|
# services on freebsd 10
|
@@ -0,0 +1 @@
|
|
1
|
+
--- {}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
Vagrant.configure("2") do |c|
|
2
|
+
c.berkshelf.enabled = false if Vagrant.has_plugin?("vagrant-berkshelf")
|
3
|
+
c.vm.box = "opscode-centos-6.7-i386"
|
4
|
+
c.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.7-i386_chef-provisionerless.box"
|
5
|
+
c.vm.hostname = "default-centos-67-i386"
|
6
|
+
c.vm.synced_folder ".", "/vagrant", disabled: true
|
7
|
+
c.vm.provider :virtualbox do |p|
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
1447703787
|
@@ -0,0 +1 @@
|
|
1
|
+
501
|
@@ -0,0 +1 @@
|
|
1
|
+
770084ca-8622-45fc-9f86-9eff5d9f6662
|
@@ -0,0 +1 @@
|
|
1
|
+
f51e44a0bf9e44db901d78ce3ecd74af
|
@@ -0,0 +1,27 @@
|
|
1
|
+
-----BEGIN RSA PRIVATE KEY-----
|
2
|
+
MIIEogIBAAKCAQEAwLGEO0LYDlsK9XekX6zmTVq0Elm/NwUtKQ7rFcBtGXzdpee0
|
3
|
+
XyhnpgnEIVL1MYL3gu3xxqNUKCrcoM1PPw8cZZqI9rT/GEEoy708wAkBbkLD81D8
|
4
|
+
ABUJ7SyP24Gj8sewuTkppkgFvYwM5yIqyP8WjCnCGr4KRUC1HCAH1U+9LJfaaarW
|
5
|
+
a5EJVDbfsrz9YoUG1fLm1nSReECFtgl7z1ZYdamjl1nd3m+OFJ5I9TRs38VEP0qg
|
6
|
+
L6XhdCyYwLqKhcF3pGF/CXkuBmlv4p722PAa/dL3RhoE2pAHAbncPuzySY/KQgLo
|
7
|
+
lsLN48LVpSBcwhXzZeyzsnr7XcsyP1s6V6ntfQIDAQABAoIBAEStgFGWy2aicE94
|
8
|
+
qu8mspaTY2a+8fXsNGJT3NnN0ZSp+l2tLY5U2kxFYs/1v0o8QXc601dW0yHV1PjC
|
9
|
+
9CGngxl7cKFtdRXx81ZaRhKzovzncut/y7FDzlvn7AXyOLrJDWWWyA9p0BH0noyq
|
10
|
+
ktE8iY6/O11IqmRwYZx6lhAi8Wu4vQ4ytVQhv15qNubka65RR9ylq0+dTPV4OIoW
|
11
|
+
H9tASvvTh3vb/zpBcBKvX4x9n6F9I2Vf0GgXwA+2E+/1frnatYqU8VjgXsc4D0yC
|
12
|
+
pWQyumGrytS6/jBnd64laqnvT1QFitaWob08WPHWYnXiBr0mlHGRpl5iz6l3sJKV
|
13
|
+
6a3LX8kCgYEA7J8jpd/ONFuPQDTrPQQJ7coDL0Dmxu5ihUVDgT/FfAz4OM9KF+ej
|
14
|
+
ptiDbl/UrSZQm1GcT3CwLOevgPcsK7rTBFOBwRxvi9Wf3I6g4QozeXcPEcZWmDAn
|
15
|
+
u+Lg6fMceKu8lwbTBLLqf02wk2IJkXgixXJJ6khxRy0qPujgQqERjbsCgYEA0Hln
|
16
|
+
6lmTOlN+mMs5pPu43ZRNy//QVUKBdOsZjyOnU3mydHRr+j1e3wN4csX6odBU2D9X
|
17
|
+
JKqd2Xep1biTGPEZjRnqgVeGzHpoDJTgGaJevhr2WZ+zySEmbIInTOtS/jGvhwG9
|
18
|
+
y23Zr5nIeVJGJ91eBT7GidjDYo7YvFabRjuXoicCgYAqR20ZMFop5Mo90LbPmi8j
|
19
|
+
+9qB0PjrRqD36x5as8hXmAGqNO+qQctt/nXNfPYFUjlI51Yko5/3BhbH1mJgFeuq
|
20
|
+
dDlVBf2wYKVFxX5dd3MnGuzoYiYK31/aJHnHk5bcwOLboW6HAmkAAiOw0e2fvnWI
|
21
|
+
DhnC8Nq8uwc3YmjfvuPiDQKBgDJFBCy7WsgWuBEp+AVzeXlcuIG3dsoIVmUWB7y/
|
22
|
+
USrMzp5MMHlP8R9/m7y5Rp1cOglHBMFfrt5wf3B8qGO8R3gBxs1XiLan0Y0vHPax
|
23
|
+
c30NzVeBLf4S00wY+lcO651F59h7MAPswjAYugGfODGGrJRBNeipbzvFzDdl/t0p
|
24
|
+
o3/DAoGAPM0tH/0E71pE3X2DGIAxgcma/waVurPGxw9+QqgksQW3+tkCg2EYuN8V
|
25
|
+
dAKKa9aI739+1Em3S0Cr4dfSon8zyEBpyZhxlpY+/KypzrQgTEYS/l8u4Vdk0L74
|
26
|
+
wL55wMiM0la2sLqUtgFF5zqSGCg7LLWNMc6owmlG5RZrneDjams=
|
27
|
+
-----END RSA PRIVATE KEY-----
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/Vagrantfile
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
Vagrant.configure("2") do |c|
|
2
|
+
c.berkshelf.enabled = false if Vagrant.has_plugin?("vagrant-berkshelf")
|
3
|
+
c.vm.box = "opscode-fedora-22"
|
4
|
+
c.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-22_chef-provisionerless.box"
|
5
|
+
c.vm.hostname = "default-fedora-22"
|
6
|
+
c.vm.synced_folder ".", "/vagrant", disabled: true
|
7
|
+
c.vm.provider :virtualbox do |p|
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
1453575633
|
@@ -0,0 +1 @@
|
|
1
|
+
501
|
@@ -0,0 +1 @@
|
|
1
|
+
320658a3-dfc8-45d0-8634-b7141f4a151f
|
@@ -0,0 +1 @@
|
|
1
|
+
fd9f2d1f81b143d3b19f61f9c124b78f
|
@@ -0,0 +1,8 @@
|
|
1
|
+
Vagrant.configure("2") do |c|
|
2
|
+
c.berkshelf.enabled = false if Vagrant.has_plugin?("vagrant-berkshelf")
|
3
|
+
c.vm.box = "modernIE/w10-edge"
|
4
|
+
c.vm.hostname = "default-modernIE-w10-edge"
|
5
|
+
c.vm.synced_folder ".", "/vagrant", disabled: true
|
6
|
+
c.vm.provider :virtualbox do |p|
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
1447702085
|
@@ -0,0 +1 @@
|
|
1
|
+
501
|
@@ -0,0 +1 @@
|
|
1
|
+
c4d4305d-fb7a-4e6e-908f-ff99620f0172
|
@@ -0,0 +1 @@
|
|
1
|
+
cf82ed6d8e4a4e2da6c509c7861f436c
|