blob: 6e32655c3bdbd9a13bf70ad701e2def81b6601f2 (
plain)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
@client @attribute_settings
Feature: Set default, normal, and override attributes
In order to easily configure similar systems
As an Administrator
I want to use different kinds of attributes
Scenario: Set a default attribute in a cookbook attribute file
Given a validated node
And it includes the recipe 'attribute_settings'
When I run the chef-client
Then the run should exit '0'
Then a file named 'attribute_setting.txt' should contain '1'
When the node is retrieved from the API
Then the inflated responses key 'attribute_priority_was' should be the integer '1'
Scenario: Set the default attribute in a role
Given a 'role' named 'attribute_settings_default' exists
And a validated node
And it includes the role 'attribute_settings_default'
When I run the chef-client
Then the run should exit '0'
And a file named 'attribute_setting.txt' should contain '2'
When the node is retrieved from the API
Then the inflated responses key 'attribute_priority_was' should be the integer '2'
Scenario: Set the default attribute in a recipe
Given a 'role' named 'attribute_settings_default' exists
And a validated node
And it includes the role 'attribute_settings_default'
And it includes the recipe 'attribute_settings::default_in_recipe'
When I run the chef-client
Then the run should exit '0'
And a file named 'attribute_setting.txt' should contain '3'
When the node is retrieved from the API
Then the inflated responses key 'attribute_priority_was' should be the integer '3'
Scenario: Set a normal attribute in a cookbook attribute file
Given a validated node
And it includes the role 'attribute_settings_default'
And it includes the recipe 'attribute_settings::default_in_recipe'
And it includes the recipe 'attribute_settings_normal'
When I run the chef-client
Then the run should exit '0'
Then a file named 'attribute_setting.txt' should contain '4'
When the node is retrieved from the API
Then the inflated responses key 'attribute_priority_was' should be the integer '4'
Scenario: Set a normal attribute in a cookbook recipe
Given a validated node
And it includes the role 'attribute_settings_default'
And it includes the recipe 'attribute_settings::default_in_recipe'
And it includes the recipe 'attribute_settings_normal::normal_in_recipe'
When I run the chef-client
Then the run should exit '0'
Then a file named 'attribute_setting.txt' should contain '5'
When the node is retrieved from the API
Then the inflated responses key 'attribute_priority_was' should be the integer '5'
Scenario: Set a override attribute in a cookbook attribute file
Given a validated node
And it includes the role 'attribute_settings_default'
And it includes the recipe 'attribute_settings::default_in_recipe'
And it includes the recipe 'attribute_settings_normal::normal_in_recipe'
And it includes the recipe 'attribute_settings_override'
When I run the chef-client
Then the run should exit '0'
Then a file named 'attribute_setting.txt' should contain '6'
When the node is retrieved from the API
Then the inflated responses key 'attribute_priority_was' should be the integer '6'
Scenario: Set the override attribute in a role
Given a 'role' named 'attribute_settings_default' exists
And a 'role' named 'attribute_settings_override' exists
And a validated node
And it includes the role 'attribute_settings_default'
And it includes the recipe 'attribute_settings::default_in_recipe'
And it includes the recipe 'attribute_settings_normal::normal_in_recipe'
And it includes the recipe 'attribute_settings_override'
And it includes the role 'attribute_settings_override'
When I run the chef-client
Then the run should exit '0'
And a file named 'attribute_setting.txt' should contain '7'
When the node is retrieved from the API
Then the inflated responses key 'attribute_priority_was' should be the integer '7'
Scenario: Set the override attribute in a recipe
Given a 'role' named 'attribute_settings_default' exists
And a 'role' named 'attribute_settings_override' exists
And a validated node
And it includes the role 'attribute_settings_default'
And it includes the recipe 'attribute_settings::default_in_recipe'
And it includes the recipe 'attribute_settings_normal::normal_in_recipe'
And it includes the recipe 'attribute_settings_override'
And it includes the role 'attribute_settings_override'
And it includes the recipe 'attribute_settings_override::override_in_recipe'
When I run the chef-client
Then the run should exit '0'
And a file named 'attribute_setting.txt' should contain '8'
When the node is retrieved from the API
Then the inflated responses key 'attribute_priority_was' should be the integer '8'
|