diff options
author | Bryan McLellan <btm@loftninjas.org> | 2020-05-13 12:39:45 -0400 |
---|---|---|
committer | Bryan McLellan <btm@loftninjas.org> | 2020-05-13 15:36:37 -0400 |
commit | 82a20300c36ff632224efcafd8758c684d86dc51 (patch) | |
tree | e15cc325584e515f5167f3f8034f93b7f9d84c2a /kitchen-tests/cookbooks/end_to_end | |
parent | af7b453f86e8656a30f3f5fa43e6a74ca8741008 (diff) | |
download | chef-82a20300c36ff632224efcafd8758c684d86dc51.tar.gz |
add initial windows end to end test recipebtm/win10-e2e
Signed-off-by: Bryan McLellan <btm@loftninjas.org>
Diffstat (limited to 'kitchen-tests/cookbooks/end_to_end')
-rw-r--r-- | kitchen-tests/cookbooks/end_to_end/recipes/windows.rb | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb b/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb new file mode 100644 index 0000000000..2d228badfb --- /dev/null +++ b/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb @@ -0,0 +1,65 @@ +# +# Cookbook:: end_to_end +# Recipe:: windows +# +# Copyright:: Copyright (c) Chef Software Inc. +# + +# hostnames on windows cannot contain a '.' +# hostname on windows requires a reboot +# hostname "chef-bk-ci" + +chef_sleep "2" + +execute "dir" + +powershell_script "sleep 1 second" do + code "Start-Sleep -s 1" + live_stream true +end + +powershell_script "sensitive sleep" do + code "Start-Sleep -s 1" + sensitive true +end + +timezone "UTC" + +include_recipe "ntp" + +users_manage "remove sysadmin" do + group_name "sysadmin" + group_id 2300 + action [:remove] +end + +# FIXME: create is not idempotent. it fails with a windows error if this already exists. +users_manage "create sysadmin" do + group_name "sysadmin" + group_id 2300 + action [:create] +end + +include_recipe "chef-client::delete_validation" +include_recipe "chef-client::config" + +include_recipe "git" + +# test various archive formats in the archive_file resource +%w{tourism.tar.gz tourism.tar.xz tourism.zip}.each do |archive| + cookbook_file File.join(Chef::Config[:file_cache_path], archive) do + source archive + end + + archive_file archive do + path File.join(Chef::Config[:file_cache_path], archive) + extract_to File.join(Chef::Config[:file_cache_path], archive.tr(".", "_")) + end +end + +locale "set system locale" do + lang "en_US.UTF-8" + only_if { debian? } +end + +include_recipe "::_ohai_hint" |