diff options
author | Lance Albertson <lance@osuosl.org> | 2021-03-15 11:02:30 -0700 |
---|---|---|
committer | Lance Albertson <lance@osuosl.org> | 2021-03-15 11:07:02 -0700 |
commit | 543289ecd5fff46cfe33646ff1d27e20e24e4d67 (patch) | |
tree | 43c997d7d579b9f1309625c6ed8ca95bbee3c25b /kitchen-tests/cookbooks | |
parent | 3d82873321d474ded1e775048480bfe8b0f0a824 (diff) | |
download | chef-543289ecd5fff46cfe33646ff1d27e20e24e4d67.tar.gz |
Fix users_manage usage in kitchen-tests
The use of data bags in the users cookbook was removed in 6.0.0 [1]. This
applies the recommended workaround and allow the integration tests to pass.
[1] https://github.com/sous-chefs/users/blob/master/CHANGELOG.md#600---2021-03-12
Signed-off-by: Lance Albertson <lance@osuosl.org>
Diffstat (limited to 'kitchen-tests/cookbooks')
-rw-r--r-- | kitchen-tests/cookbooks/end_to_end/recipes/linux.rb | 3 | ||||
-rw-r--r-- | kitchen-tests/cookbooks/end_to_end/recipes/macos.rb | 4 | ||||
-rw-r--r-- | kitchen-tests/cookbooks/end_to_end/recipes/windows.rb | 4 |
3 files changed, 11 insertions, 0 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..4527f86971 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb @@ -86,9 +86,12 @@ windows_audit_policy "Update Some Advanced Audit Policies to No Auditing" do failure false end +users_from_databag = search("users", "*:*") + users_manage "remove sysadmin" do group_name "sysadmin" group_id 2300 + users users_from_databag action [:remove] end @@ -96,6 +99,7 @@ end users_manage "create sysadmin" do group_name "sysadmin" group_id 2300 + users users_from_databag action [:create] end |