Last active
August 29, 2015 14:02
-
-
Save vinyar/8c84d85ad989e30db7ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
attribute: | |
default['ge_opsware_agent']['agent_dir'] = "/opt/opsware/stage/agent" | |
recipe: | |
directory node['ge_opsware_agent']['agent_dir'] do | |
owner "root" | |
group "root" | |
mode 0755 | |
action :create | |
recursive true | |
end | |
resulting resource: | |
directory[/opt/opsware/stage/agent] @name: "/opt/opsware/stage/agent" @noop: nil @before: nil @params: {} @ | |
provider: Chef::Provider::Directory @allowed_actions: [:nothing, :create, :delete] @action: [:create] | |
@updated: false @updated_by_last_action: false @supports: {} @ignore_failure: false @retries: 0 @r | |
etry_delay: 2 @source_line: "(irb#2):1:in `irb_binding'" @guard_interpreter: :default @elapsed_time: 0 | |
@resource_name: :directory @path: "/opt/opsware/stage/agent" @recursive: true @cookbook_name: nil @recipe_name: nil @ | |
owner: "root" @group: "root" @mode: 493> | |
Unit test: | |
it 'create directory' do | |
expect(chef_run).to create_directory('/opt/opsware/stage/agent').with_owner('root').with_group('root').with_mode('0755') | |
end | |
failure: | |
mode "0755", was 493 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment