Skip to content

Instantly share code, notes, and snippets.

@juliandunn
Created December 12, 2013 23:33
Show Gist options
  • Save juliandunn/7937510 to your computer and use it in GitHub Desktop.
Save juliandunn/7937510 to your computer and use it in GitHub Desktop.
Test Kitchen works with FreeBSD!
borkbork ~/devel/gh/juliandunn/chef-client (fix-kitchen-yml)$ kitchen test config-freebsd-92
-----> Starting Kitchen (v1.1.1)
-----> Cleaning up any prior instances of <config-freebsd-92>
-----> Destroying <config-freebsd-92>...
Finished destroying <config-freebsd-92> (0m0.00s).
-----> Testing <config-freebsd-92>
-----> Creating <config-freebsd-92>...
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'opscode-freebsd-9.2'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[Berkshelf] Skipping Berkshelf with --no-provision
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Running 'pre-boot' VM customizations...
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
[default] The guest additions on this VM do not match the installed version of
VirtualBox! In most cases this is fine, but in rare cases it can
cause things such as shared folders to not work properly. If you see
shared folder errors, please update the guest additions within the
virtual machine and reload your VM.
Guest Additions Version: 4.2.16
VirtualBox Version: 4.3
[default] Setting hostname...
Vagrant instance <config-freebsd-92> created.
Finished creating <config-freebsd-92> (0m57.85s).
-----> Converging <config-freebsd-92>...
Preparing files for transfer
Resolving cookbook dependencies with Berkshelf...
Removing non-cookbook files before transfer
-----> Installing Chef Omnibus (true)
downloading https://www.opscode.com/chef/install.sh
to file /tmp/install.sh
trying curl...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 14061 100 14061 0 0 31660 0 --:--:-- --:--:-- --:--:-- 31668
Downloading Chef for freebsd...
downloading http://www.opscode.com/chef/metadata?v=&prerelease=false&p=freebsd&pv=9&m=amd64
to file /tmp/install.sh.917/metadata.txt
trying curl...
url http://opscode-omnibus-packages.s3.amazonaws.com/freebsd/9/amd64/chef-11.8.2_1.freebsd.9.amd64.sh
md5 e49889f1f84a4b50e76e5e83baccb2db
sha256 a685c06b7981c9bf40907d31d6dd098b9e292f212919140c8b6bc3764a9e9740
downloaded metadata file looks valid...
downloading http://opscode-omnibus-packages.s3.amazonaws.com/freebsd/9/amd64/chef-11.8.2_1.freebsd.9.amd64.sh
to file /tmp/install.sh.917/chef--freebsd-9-amd64.sh
trying curl...
Checksum compare with shasum succeeded.
Installing Chef
installing with sh...
Verifying archive integrity... All good.
Uncompressing The full stack of chef...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Thank you for installing Chef!
Transfering files to <config-freebsd-92>
[2013-12-12T23:30:28+00:00] INFO: Forking chef instance to converge...
Starting Chef Client, version 11.8.2
[2013-12-12T23:30:28+00:00] INFO: *** Chef 11.8.2 ***
[2013-12-12T23:30:28+00:00] INFO: Chef-client pid: 1026
[2013-12-12T23:30:29+00:00] INFO: Setting the run_list to ["recipe[minitest-handler]", "recipe[chef-client_test::config]", "recipe[chef-client::config]"] from JSON
[2013-12-12T23:30:29+00:00] INFO: Run List is [recipe[minitest-handler], recipe[chef-client_test::config], recipe[chef-client::config]]
[2013-12-12T23:30:29+00:00] INFO: Run List expands to [minitest-handler, chef-client_test::config, chef-client::config]
[2013-12-12T23:30:29+00:00] INFO: Starting Chef Run for config-freebsd-92
[2013-12-12T23:30:29+00:00] INFO: Running start handlers
[2013-12-12T23:30:29+00:00] INFO: Start handlers complete.
Compiling Cookbooks...
Recipe: minitest-handler::default
* chef_gem[minitest] action nothing [2013-12-12T23:30:29+00:00] INFO: Processing chef_gem[minitest] action nothing (minitest-handler::default line 2)
(skipped due to action :nothing)
* chef_gem[minitest] action install [2013-12-12T23:30:29+00:00] INFO: Processing chef_gem[minitest] action install (minitest-handler::default line 2)
(skipped due to only_if)
* chef_gem[minitest-chef-handler] action nothing [2013-12-12T23:30:29+00:00] INFO: Processing chef_gem[minitest-chef-handler] action nothing (minitest-handler::default line 9)
(skipped due to action :nothing)
* chef_gem[minitest-chef-handler] action install [2013-12-12T23:30:29+00:00] INFO: Processing chef_gem[minitest-chef-handler] action install (minitest-handler::default line 9)
- install version 1.0.1 of package minitest-chef-handler
[2013-12-12T23:31:48+00:00] WARN: Cloning resource attributes for directory[minitest test location] from prior resource (CHEF-3694)
[2013-12-12T23:31:48+00:00] WARN: Previous directory[minitest test location]: /tmp/kitchen/cookbooks/minitest-handler/recipes/default.rb:18:in `block in from_file'
[2013-12-12T23:31:48+00:00] WARN: Current directory[minitest test location]: /tmp/kitchen/cookbooks/minitest-handler/recipes/default.rb:18:in `block in from_file'
Recipe: chef-client::config
* chef_gem[chef-handler-updated-resources] action install [2013-12-12T23:31:48+00:00] INFO: Processing chef_gem[chef-handler-updated-resources] action install (chef-client::config line 59)
- install version 0.1 of package chef-handler-updated-resources
Converging 14 resources
Recipe: minitest-handler::default
* chef_gem[minitest] action nothing [2013-12-12T23:31:49+00:00] INFO: Processing chef_gem[minitest] action nothing (minitest-handler::default line 2)
(skipped due to action :nothing)
* chef_gem[minitest-chef-handler] action nothing [2013-12-12T23:31:49+00:00] INFO: Processing chef_gem[minitest-chef-handler] action nothing (minitest-handler::default line 9)
(skipped due to action :nothing)
* directory[minitest test location] action delete [2013-12-12T23:31:49+00:00] INFO: Processing directory[minitest test location] action delete (minitest-handler::default line 18)
(up to date)
* directory[minitest test location] action create [2013-12-12T23:31:49+00:00] INFO: Processing directory[minitest test location] action create (minitest-handler::default line 18)
[2013-12-12T23:31:49+00:00] INFO: directory[minitest test location] created directory /var/chef/minitest
- create new directory /var/chef/minitest
[2013-12-12T23:31:49+00:00] INFO: directory[minitest test location] owner changed to 0
[2013-12-12T23:31:49+00:00] INFO: directory[minitest test location] mode changed to 775
- change mode from '' to '0775'
- change owner from '' to 'root'
* ruby_block[load tests] action run [2013-12-12T23:31:49+00:00] INFO: Processing ruby_block[load tests] action run (minitest-handler::default line 29)
Recipe: <Dynamically Defined Resource>
* directory[/var/chef/minitest/minitest-handler] action create [2013-12-12T23:31:49+00:00] INFO: Processing directory[/var/chef/minitest/minitest-handler] action create (dynamically defined)
[2013-12-12T23:31:49+00:00] INFO: directory[/var/chef/minitest/minitest-handler] created directory /var/chef/minitest/minitest-handler
- create new directory /var/chef/minitest/minitest-handler
* directory[/var/chef/minitest/chef-client_test] action create [2013-12-12T23:31:49+00:00] INFO: Processing directory[/var/chef/minitest/chef-client_test] action create (dynamically defined)
[2013-12-12T23:31:49+00:00] INFO: directory[/var/chef/minitest/chef-client_test] created directory /var/chef/minitest/chef-client_test
- create new directory /var/chef/minitest/chef-client_test
* directory[/var/chef/minitest/chef-client] action create [2013-12-12T23:31:49+00:00] INFO: Processing directory[/var/chef/minitest/chef-client] action create (dynamically defined)
[2013-12-12T23:31:49+00:00] INFO: directory[/var/chef/minitest/chef-client] created directory /var/chef/minitest/chef-client
- create new directory /var/chef/minitest/chef-client
[2013-12-12T23:31:49+00:00] INFO: Enabling minitest-chef-handler as a report handler
[2013-12-12T23:31:49+00:00] INFO: ruby_block[load tests] called
- execute the ruby block load tests
Recipe: chef-client::config
* directory[/var/run] action create [2013-12-12T23:31:49+00:00] INFO: Processing directory[/var/run] action create (chef-client::config line 77)
(up to date)
* directory[/var/chef/cache] action create [2013-12-12T23:31:49+00:00] INFO: Processing directory[/var/chef/cache] action create (chef-client::config line 77)
[2013-12-12T23:31:49+00:00] INFO: directory[/var/chef/cache] created directory /var/chef/cache
- create new directory /var/chef/cache
[2013-12-12T23:31:49+00:00] INFO: directory[/var/chef/cache] owner changed to 0
[2013-12-12T23:31:49+00:00] INFO: directory[/var/chef/cache] group changed to 0
- change owner from '' to 'root'
- change group from '' to 'wheel'
* directory[/var/chef/backup] action create [2013-12-12T23:31:49+00:00] INFO: Processing directory[/var/chef/backup] action create (chef-client::config line 77)
[2013-12-12T23:31:49+00:00] INFO: directory[/var/chef/backup] created directory /var/chef/backup
- create new directory /var/chef/backup
[2013-12-12T23:31:49+00:00] INFO: directory[/var/chef/backup] owner changed to 0
[2013-12-12T23:31:49+00:00] INFO: directory[/var/chef/backup] group changed to 0
- change owner from '' to 'root'
- change group from '' to 'wheel'
* directory[/var/log/chef] action create [2013-12-12T23:31:49+00:00] INFO: Processing directory[/var/log/chef] action create (chef-client::config line 77)
[2013-12-12T23:31:50+00:00] INFO: directory[/var/log/chef] created directory /var/log/chef
- create new directory /var/log/chef
[2013-12-12T23:31:50+00:00] INFO: directory[/var/log/chef] owner changed to 0
[2013-12-12T23:31:50+00:00] INFO: directory[/var/log/chef] group changed to 0
[2013-12-12T23:31:50+00:00] INFO: directory[/var/log/chef] mode changed to 750
- change mode from '' to '0750'
- change owner from '' to 'root'
- change group from '' to 'wheel'
* directory[/etc/chef] action create [2013-12-12T23:31:50+00:00] INFO: Processing directory[/etc/chef] action create (chef-client::config line 77)
[2013-12-12T23:31:50+00:00] INFO: directory[/etc/chef] created directory /etc/chef
- create new directory /etc/chef
[2013-12-12T23:31:50+00:00] INFO: directory[/etc/chef] owner changed to 0
[2013-12-12T23:31:50+00:00] INFO: directory[/etc/chef] group changed to 0
- change owner from '' to 'root'
- change group from '' to 'wheel'
* chef_gem[chef-handler-updated-resources] action install [2013-12-12T23:31:50+00:00] INFO: Processing chef_gem[chef-handler-updated-resources] action install (chef-client::config line 59)
(up to date)
* template[/etc/chef/client.rb] action create [2013-12-12T23:31:50+00:00] INFO: Processing template[/etc/chef/client.rb] action create (chef-client::config line 71)
[2013-12-12T23:31:50+00:00] INFO: template[/etc/chef/client.rb] created file /etc/chef/client.rb
- create new file /etc/chef/client.rb
[2013-12-12T23:31:50+00:00] INFO: template[/etc/chef/client.rb] updated file contents /etc/chef/client.rb
- update content in file /etc/chef/client.rb from none to c71b57
--- /etc/chef/client.rb 2013-12-12 23:31:50.080833387 +0000
+++ /tmp/chef-rendered-template20131212-1026-1o6teti 2013-12-12 23:31:50.100858450 +0000
@@ -1 +1,23 @@
+["chef/handler/updated_resources"].each do |lib|
+ begin
+ require lib
+ rescue LoadError
+ Chef::Log.warn "Failed to load #{lib}. This should be resolved after a chef run."
+ end
+end
+
+chef_server_url "http://127.0.0.1:8889"
+validation_client_name "chef-validator"
+log_level :debug
+ssl_verify_mode :verify_peer
+node_name "config-freebsd-92"
+Ohai::Config[:disabled_plugins] = ["passwd"]
+
+start_handlers << SimpleReport::UpdatedResources.new()
+report_handlers << SimpleReport::UpdatedResources.new()
+exception_handlers << SimpleReport::UpdatedResources.new()
+
+Dir.glob(File.join("/etc/chef", "client.d", "*.rb")).each do |conf|
+ Chef::Config.from_file(conf)
+end
[2013-12-12T23:31:50+00:00] INFO: template[/etc/chef/client.rb] owner changed to 0
[2013-12-12T23:31:50+00:00] INFO: template[/etc/chef/client.rb] group changed to 0
[2013-12-12T23:31:50+00:00] INFO: template[/etc/chef/client.rb] mode changed to 644
- change mode from '' to '0644'
- change owner from '' to 'root'
- change group from '' to 'wheel'
[2013-12-12T23:31:50+00:00] INFO: template[/etc/chef/client.rb] sending create action to ruby_block[reload_client_config] (immediate)
* ruby_block[reload_client_config] action create [2013-12-12T23:31:50+00:00] INFO: Processing ruby_block[reload_client_config] action create (chef-client::config line 94)
[2013-12-12T23:31:50+00:00] INFO: ruby_block[reload_client_config] called
- execute the ruby block reload_client_config
* directory[/etc/chef/client.d] action create [2013-12-12T23:31:50+00:00] INFO: Processing directory[/etc/chef/client.d] action create (chef-client::config line 87)
[2013-12-12T23:31:50+00:00] INFO: directory[/etc/chef/client.d] created directory /etc/chef/client.d
- create new directory /etc/chef/client.d
[2013-12-12T23:31:50+00:00] INFO: directory[/etc/chef/client.d] owner changed to 0
[2013-12-12T23:31:50+00:00] INFO: directory[/etc/chef/client.d] group changed to 0
[2013-12-12T23:31:50+00:00] INFO: directory[/etc/chef/client.d] mode changed to 755
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'wheel'
* ruby_block[reload_client_config] action nothing [2013-12-12T23:31:50+00:00] INFO: Processing ruby_block[reload_client_config] action nothing (chef-client::config line 94)
(skipped due to action :nothing)
[2013-12-12T23:31:50+00:00] INFO: Chef Run complete in 80.719560116 seconds
[2013-12-12T23:31:50+00:00] INFO: Running report handlers
Run options: -v --seed 34055
# Running tests:
chef-client::config#test_0001_creates the client config file = 0.00 s = .
chef-client::config#test_0006_enables report_handlers = 0.00 s = .
chef-client::config#test_0002_disables ohai plugins = 0.00 s = .
chef-client::config#test_0007_enables exception_handlers = 0.00 s = .
chef-client::config#test_0008_creates a directory for including config = 0.00 s = .
chef-client::config#test_0005_enables start_handlers = 0.00 s = .
chef-client::config#test_0004_converts ssl_verify_mode to a symbol = 0.00 s = .
chef-client::config#test_0001_contains the default config settings = 0.00 s = .
chef-client::config#test_0003_converts log_level to a symbol = 0.00 s = .
Finished tests in 0.017069s, 527.2828 tests/s, 585.8698 assertions/s.
9 tests, 10 assertions, 0 failures, 0 errors, 0 skips
[2013-12-12T23:31:50+00:00] INFO: Resources updated this run:
[2013-12-12T23:31:50+00:00] INFO: chef_gem[minitest-chef-handler]
[2013-12-12T23:31:50+00:00] INFO: directory[minitest test location]
[2013-12-12T23:31:50+00:00] INFO: ruby_block[load tests]
[2013-12-12T23:31:50+00:00] INFO: directory[/var/chef/cache]
[2013-12-12T23:31:50+00:00] INFO: directory[/var/chef/backup]
[2013-12-12T23:31:50+00:00] INFO: directory[/var/log/chef]
[2013-12-12T23:31:50+00:00] INFO: directory[/etc/chef]
[2013-12-12T23:31:50+00:00] INFO: chef_gem[chef-handler-updated-resources]
[2013-12-12T23:31:50+00:00] INFO: template[/etc/chef/client.rb]
[2013-12-12T23:31:50+00:00] INFO: directory[/etc/chef/client.d]
[2013-12-12T23:31:50+00:00] INFO: ruby_block[reload_client_config]
[2013-12-12T23:31:50+00:00] INFO: Report handlers complete
Chef Client finished, 14 resources updated
Finished converging <config-freebsd-92> (2m26.83s).
-----> Setting up <config-freebsd-92>...
Finished setting up <config-freebsd-92> (0m0.00s).
-----> Verifying <config-freebsd-92>...
Finished verifying <config-freebsd-92> (0m0.00s).
-----> Destroying <config-freebsd-92>...
[default] Forcing shutdown of VM...
[default] Destroying VM and associated drives...
Vagrant instance <config-freebsd-92> destroyed.
Finished destroying <config-freebsd-92> (0m7.26s).
Finished testing <config-freebsd-92> (3m32.01s).
-----> Kitchen is finished. (3m32.37s)
borkbork ~/devel/gh/juliandunn/chef-client (fix-kitchen-yml)$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment