Skip to content

Commit

Permalink
Merge pull request #693 from takumin/add_system_group_option
Browse files Browse the repository at this point in the history
Add system_group option
  • Loading branch information
mizzy committed Jul 29, 2019
2 parents 1f5a76f + 216f731 commit 30e1c21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/specinfra/command/base/group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def update_gid(group, gid)
def add(group, options)
command = ['groupadd']
command << '-g' << escape(options[:gid]) if options[:gid]
command << '-r' if options[:system_group]
command << escape(group)
command.join(' ')
end
Expand Down
3 changes: 3 additions & 0 deletions spec/command/base/group_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@
it { should eq 'groupadd -g 1234 foo' }
end

describe get_command(:add_group, 'foo', :system_group => true) do
it { should eq 'groupadd -r foo' }
end

0 comments on commit 30e1c21

Please sign in to comment.