diff options
author | Tim Smith <tsmith@chef.io> | 2020-05-29 19:49:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-29 19:49:09 -0700 |
commit | be04cef7fa503fc3dde15a518773add44ea61601 (patch) | |
tree | 6d04c6c62e5be262f61b06ef7df12328a7e58c10 | |
parent | 2b686a4fe118079a389f0b8b185a67333886b09a (diff) | |
parent | 2ac01b1197c5e55296df748adade97b887c647c6 (diff) | |
download | chef-be04cef7fa503fc3dde15a518773add44ea61601.tar.gz |
Merge pull request #9939 from chef/expand_kitchen_testing
Add additional testing for macOS hosts
8 files changed, 57 insertions, 9 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 765812faf9..a40fba3f9f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,9 +6,8 @@ variables: trigger: - master -# TODO: 20190528 - should we be testing end_to_end on chef-15 and chef-14? +# TODO: 20190528 - should we be testing end_to_end on chef-15? #- chef-15 -#- chef-14 pool: vmImage: $(imageName) @@ -17,9 +16,9 @@ jobs: - job: strategy: matrix: - linux: + ubuntu_kitchen_tests: imageName: 'ubuntu-latest' - mac: + mac_kitchen_tests: imageName: 'macos-latest' steps: @@ -53,7 +52,7 @@ jobs: - job: strategy: matrix: - windows: + windows_kitchen_tests: imageName: 'windows-latest' steps: diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/_cron.rb b/kitchen-tests/cookbooks/end_to_end/recipes/_cron.rb index 545d895869..b2575923ea 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/_cron.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/_cron.rb @@ -64,4 +64,4 @@ end cron "remove_a_job" do action :delete -end
\ No newline at end of file +end diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/_dmg_package.rb b/kitchen-tests/cookbooks/end_to_end/recipes/_dmg_package.rb new file mode 100644 index 0000000000..27dad15c80 --- /dev/null +++ b/kitchen-tests/cookbooks/end_to_end/recipes/_dmg_package.rb @@ -0,0 +1,21 @@ +# +# Cookbook:: end_to_end +# Recipe:: _dmg_package +# +# Copyright:: Copyright (c) Chef Software Inc. +# + +dmg_package "LittleSecrets" do + source "https://www.mani.de/download/littlesecrets/LittleSecrets1.9.4.dmg" + checksum "8281c1f648c038b296a02940126c29032ff387b90a880d63834e303e1b3a5ff7" + action :install +end + +dmg_package "virtualbox" do + app "virtualbox" + source "http://download.virtualbox.org/virtualbox/6.1.8/VirtualBox-6.1.8-137981-OSX.dmg" + checksum "569e91eb3c7cb002d407b236a7aa71ac610cf2ad1afa03730dab11fbd4b89e7c" + type "pkg" + accept_eula true + allow_untrusted true +end diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/_macos_userdefaults.rb b/kitchen-tests/cookbooks/end_to_end/recipes/_macos_userdefaults.rb new file mode 100644 index 0000000000..6fcdd51d10 --- /dev/null +++ b/kitchen-tests/cookbooks/end_to_end/recipes/_macos_userdefaults.rb @@ -0,0 +1,26 @@ +# +# Cookbook:: end_to_end +# Recipe:: _macos_userdefaults +# +# Copyright:: Copyright (c) Chef Software Inc. +# + +mac_os_x_userdefaults "Disable fast user switching" do + domain "/Library/Preferences/.GlobalPreferences" + key "MultipleSessionEnabled" + value 0 +end + +macos_userdefaults "enable macOS firewall" do + domain "/Library/Preferences/com.apple.alf" + key "globalstate" + value "1" + type "int" +end + +macos_userdefaults "set dock size" do + domain "com.apple.dock" + type "integer" + key "tilesize" + value "20" +end diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/_sysctl.rb b/kitchen-tests/cookbooks/end_to_end/recipes/_sysctl.rb index b5943180d0..7bc3ae84d2 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/_sysctl.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/_sysctl.rb @@ -18,4 +18,4 @@ end sysctl_param "bogus.sysctl_val" do value 9000 action :remove -end
\ No newline at end of file +end diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/_yum.rb b/kitchen-tests/cookbooks/end_to_end/recipes/_yum.rb index f6f48a89c9..af36038ca7 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/_yum.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/_yum.rb @@ -13,4 +13,4 @@ yum_repository "epel" do gpgcheck true mirrorlist "https://mirrors.fedoraproject.org/metalink?repo=epel-#{node["platform_version"].to_i}&arch=$basearch" only_if { rhel? } -end
\ No newline at end of file +end diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/default.rb b/kitchen-tests/cookbooks/end_to_end/recipes/default.rb index c353e181e9..20971a0333 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/default.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/default.rb @@ -5,6 +5,6 @@ # Copyright:: Copyright (c) Chef Software Inc. # -include_recipe "::linux" if platform_family?("rhel", "debian") +include_recipe "::linux" if linux? include_recipe "::macos" if macos? include_recipe "::windows" if windows? diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb index f1250fb7a1..30b674620b 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb @@ -61,5 +61,7 @@ launchd "io.chef.testing.fake" do action "enable" end +include_recipe "::_dmg_package" +include_recipe "::_macos_userdefaults" include_recipe "::_ohai_hint" include_recipe "::_openssl" |