File tree Expand file tree Collapse file tree
data/cookbooks/manage_files/recipes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #
2+ # Cookbook Name:: files
3+ # Recipe:: default
4+ #
5+ # Copyright 2009, Opscode
6+ #
7+ # Licensed under the Apache License, Version 2.0 (the "License");
8+ # you may not use this file except in compliance with the License.
9+ # You may obtain a copy of the License at
10+ #
11+ # http://www.apache.org/licenses/LICENSE-2.0
12+ #
13+ # Unless required by applicable law or agreed to in writing, software
14+ # distributed under the License is distributed on an "AS IS" BASIS,
15+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+ # See the License for the specific language governing permissions and
17+ # limitations under the License.
18+ #
19+
20+ file "#{ node [ :tmpdir ] } /create_a_file.txt" do
21+ owner 'nobody'
22+ action :create
23+ end
Original file line number Diff line number Diff line change @@ -15,9 +15,8 @@ Feature: Manage Files
1515 And it includes the recipe 'manage_files::set_the_owner_of_a_created_file'
1616 When I run the chef-client
1717 Then the run should exit '0'
18- And a file named 'create_a_file.txt' should exist
19-
20-
18+ And the file named 'create_a_file.txt' should be owned by 'nobody'
19+
2120 Scenario : Delete a file
2221 Given a validated node
2322 And it includes the recipe 'manage_files::delete_a_file'
Load diff This file was deleted.
Original file line number Diff line number Diff line change 5252 current_atime . should_not == @atime
5353 end
5454end
55+
56+ Then /^the file named '(.+)' should be owned by '(.+)'$/ do |filename , owner |
57+
58+ end
59+
You can’t perform that action at this time.
0 commit comments