summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kitchen-tests/cookbooks/end_to_end/recipes/linux.rb3
-rw-r--r--kitchen-tests/cookbooks/end_to_end/recipes/macos.rb4
-rw-r--r--kitchen-tests/cookbooks/end_to_end/recipes/windows.rb29
-rw-r--r--kitchen-tests/data_bags/users/adam.json2
4 files changed, 25 insertions, 13 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb b/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb
index 7f72c0b76a..cd8c9c4d27 100644
--- a/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb
+++ b/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb
@@ -44,8 +44,11 @@ resolver_config "/etc/resolv.conf" do
search [ "chef.io" ]
end
+users_from_databag = search("users", "*:*")
+
users_manage "sysadmin" do
group_id 2300
+ users users_from_databag
action [:create]
end
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb
index 9dac062a87..1fb76adb5e 100644
--- a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb
+++ b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb
@@ -28,15 +28,19 @@ resolver_config "/etc/resolv.conf" do
search [ "chef.io" ]
end
+users_from_databag = search("users", "*:*")
+
users_manage "remove sysadmin" do
group_name "sysadmin"
group_id 2300
+ users users_from_databag
action [:remove]
end
users_manage "create sysadmin" do
group_name "sysadmin"
group_id 2300
+ users users_from_databag
action [:create]
end
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb b/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb
index 2558639df6..6e7ebf08a7 100644
--- a/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb
+++ b/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb
@@ -86,18 +86,23 @@ windows_audit_policy "Update Some Advanced Audit Policies to No Auditing" do
failure false
end
-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
+# FIXME: upstream users cookbooks is currently broken on windows
+# users_from_databag = search("users", "*:*")
+#
+# users_manage "remove sysadmin" do
+# group_name "sysadmin"
+# group_id 2300
+# users users_from_databag
+# 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
+# users users_from_databag
+# action [:create]
+# end
include_recipe "::_chef_client_config"
include_recipe "::_chef_client_trusted_certificate"
diff --git a/kitchen-tests/data_bags/users/adam.json b/kitchen-tests/data_bags/users/adam.json
index f96d7c213f..ecd4b73e74 100644
--- a/kitchen-tests/data_bags/users/adam.json
+++ b/kitchen-tests/data_bags/users/adam.json
@@ -5,5 +5,5 @@
"shell": "/bin/zsh",
"groups": [ "sysadmin" ],
"comment": "Adam Jacob",
- "password": "*"
+ "password": "$6$QQk10qmDjMv.o$wHIjLH9JOxUmaJTsxYFttFhP1jZZtTk/ovhpasmQJS5mfimeFs8HMRWGWM8uBB5dhEmP6svqhRdJE5k1oWRPF1"
}