Skip to content

Commit

Permalink
Generated file correct default group
Browse files Browse the repository at this point in the history
  • Loading branch information
bmhughes committed Jul 10, 2020
1 parent daccb3d commit 37f1cf0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/_user_ssh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
description: 'Owner of the generated file'

property :group, [Integer, String],
default: lazy { user },
description: 'Group of the generated file'

property :mode, String,
Expand Down
4 changes: 4 additions & 0 deletions test/integration/default/default_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
its('type') { should cmp 'file' }
it { should be_file }
it { should_not be_directory }
its('owner') { should eq 'testuser01' }
its('group') { should eq 'testuser01' }
its('content') { should match %r{ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEA0JNuXwaB8T/3pR/MqehUn0tjt0jN8Cgf6PuSS1YZRUDc7T6mFGphO04/YzSIBsWdWKZe2uWgzJJkUGN815ua7CYQktfDVMRx12baBAtLsqeseheUSxlJhg5oA1NckpdXuN7ca3vAl6Rc6P/Njj10OPglRX17/J284KOXCkg\+LDr6pJEglxXETJLiip7XSy70E/T14QkjlzFIFTU9xkb1\+\+p2wLxNI2qAPaZZHN9LrNHeq8t129psc8jnkAEGMjufGJuyZKZCAEcr6/Na9kGoJbv5vi0WieCvL22sdA3hCuMrPcFkqYIz9RysOzwRwX/IdkSg5Jv5b9CZuMskA5Kb9Q== Test Key 01} }
end

Expand All @@ -20,5 +22,7 @@
its('type') { should cmp 'file' }
it { should be_file }
it { should_not be_directory }
its('owner') { should eq 'testuser01' }
its('group') { should eq 'testuser01' }
its('content') { should match %r{testhost ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAInmlzdHAyNTYAAABBBMGCI1q4BvctMzIPGRwLZsyZRjbIzy0Qmai8gJd\+rVvmbBzqhjSspKkHeKUOQSEc\+JTsP/JjFdUgEii83uWTsm0=} }
end

0 comments on commit 37f1cf0

Please sign in to comment.