-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanage_files.feature
More file actions
63 lines (55 loc) · 2.57 KB
/
Copy pathmanage_files.feature
File metadata and controls
63 lines (55 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
@provider @provider_file
Feature: Manage Files
In order to save time
As a Developer
I want to manage files declaratively
Scenario: Create a file
Given a validated node
And it includes the recipe 'manage_files::create_a_file'
When I run the chef-client
Then the run should exit '0'
And a file named 'create_a_file.txt' should exist
Scenario: Set the owner of a created file
Given a validated node
And it includes the recipe 'manage_files::set_the_owner_of_a_created_file'
When I run the chef-client
Then the run should exit '0'
And the file named 'create_a_file.txt' should be owned by 'nobody'
Scenario: Delete a file
Given a validated node
And it includes the recipe 'manage_files::delete_a_file'
When I run the chef-client
Then the run should exit '0'
And a file named 'create_a_file.txt' should not exist
Scenario: Delete a file that already does not exist
Given a validated node
And it includes the recipe 'manage_files::delete_a_file_that_does_not_already_exist'
When I run the chef-client
Then the run should exit '0'
Scenario: Touch a file
Given a validated node
And it includes the recipe 'manage_files::touch_a_file'
And we have an empty file named 'touch_test.txt'
And we have the atime/mtime of 'touch_test.txt'
When I run the chef-client
Then the run should exit '0'
And the atime of 'touch_test.txt' should be different
And the mtime of 'touch_test.txt' should be different
Scenario: Set the accessibility of a created file
Given a validated node
And it includes the recipe 'manage_files::set_the_accessibility_of_a_created_file'
When I run the chef-client
Then the run should exit '0'
And the file named 'octal0644.txt' should have octal mode '0644'
And the file named 'octal2644.txt' should have octal mode '2644'
And the file named 'decimal644.txt' should have decimal mode '644'
And the file named 'decimal2644.txt' should have decimal mode '2644'
And the file named 'string644.txt' should have octal mode '644'
And the file named 'string0644.txt' should have octal mode '0644'
And the file named 'string2644.txt' should have octal mode '2644'
Scenario: Set the contents of a file
Given a validated node
And it includes the recipe 'manage_files::manage_file_contents'
When I run the chef-client
Then the run should exit '0'
And a file named 'aqua_teen.txt' should contain 'I am using the e-photo plugin, you pop it on your back and go'