@@ -20,6 +20,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
2020 "server_url" : "https://chef.local" ,
2121 "validation_client_name" : "validator" ,
2222 "validation_key_path" : "validator.pem" ,
23+ "secret_key_path" : "encrypted_data_bag_secret" ,
2324 }),
2425
2526 Commands : map [string ]bool {
@@ -37,6 +38,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
3738 "server_url" : "https://chef.local" ,
3839 "validation_client_name" : "validator" ,
3940 "validation_key_path" : "validator.pem" ,
41+ "secret_key_path" : "encrypted_data_bag_secret" ,
4042 }),
4143
4244 Commands : map [string ]bool {
@@ -55,6 +57,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
5557 "server_url" : "https://chef.local" ,
5658 "validation_client_name" : "validator" ,
5759 "validation_key_path" : "validator.pem" ,
60+ "secret_key_path" : "encrypted_data_bag_secret" ,
5861 }),
5962
6063 Commands : map [string ]bool {
@@ -73,6 +76,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
7376 "server_url" : "https://chef.local" ,
7477 "validation_client_name" : "validator" ,
7578 "validation_key_path" : "validator.pem" ,
79+ "secret_key_path" : "encrypted_data_bag_secret" ,
7680 }),
7781
7882 Commands : map [string ]bool {
@@ -92,6 +96,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
9296 "server_url" : "https://chef.local" ,
9397 "validation_client_name" : "validator" ,
9498 "validation_key_path" : "validator.pem" ,
99+ "secret_key_path" : "encrypted_data_bag_secret" ,
95100 }),
96101
97102 Commands : map [string ]bool {
@@ -112,6 +117,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
112117 "server_url" : "https://chef.local" ,
113118 "validation_client_name" : "validator" ,
114119 "validation_key_path" : "validator.pem" ,
120+ "secret_key_path" : "encrypted_data_bag_secret" ,
115121 "version" : "11.18.6" ,
116122 }),
117123
@@ -158,6 +164,7 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
158164 "server_url" : "https://chef.local" ,
159165 "validation_client_name" : "validator" ,
160166 "validation_key_path" : "test-fixtures/validator.pem" ,
167+ "secret_key_path" : "test-fixtures/encrypted_data_bag_secret" ,
161168 }),
162169
163170 Commands : map [string ]bool {
@@ -170,6 +177,7 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
170177
171178 Uploads : map [string ]string {
172179 linuxConfDir + "/validation.pem" : "VALIDATOR-PEM-FILE" ,
180+ linuxConfDir + "/encrypted_data_bag_secret" :"SECRET-KEY-FILE" ,
173181 linuxConfDir + "/ohai/hints/ohaihint.json" : "OHAI-HINT-FILE" ,
174182 linuxConfDir + "/client.rb" : defaultLinuxClientConf ,
175183 linuxConfDir + "/first-boot.json" : `{"run_list":["cookbook::recipe"]}` ,
@@ -184,6 +192,7 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
184192 "server_url" : "https://chef.local" ,
185193 "validation_client_name" : "validator" ,
186194 "validation_key_path" : "test-fixtures/validator.pem" ,
195+ "secret_key_path" : "test-fixtures/encrypted_data_bag_secret" ,
187196 }),
188197
189198 Commands : map [string ]bool {
@@ -192,6 +201,7 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
192201
193202 Uploads : map [string ]string {
194203 linuxConfDir + "/validation.pem" : "VALIDATOR-PEM-FILE" ,
204+ linuxConfDir + "/encrypted_data_bag_secret" :"SECRET-KEY-FILE" ,
195205 linuxConfDir + "/client.rb" : defaultLinuxClientConf ,
196206 linuxConfDir + "/first-boot.json" : `{"run_list":["cookbook::recipe"]}` ,
197207 },
@@ -208,6 +218,7 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
208218 "server_url" : "https://chef.local" ,
209219 "validation_client_name" : "validator" ,
210220 "validation_key_path" : "test-fixtures/validator.pem" ,
221+ "secret_key_path" : "test-fixtures/encrypted_data_bag_secret" ,
211222 }),
212223
213224 Commands : map [string ]bool {
@@ -216,6 +227,7 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
216227
217228 Uploads : map [string ]string {
218229 linuxConfDir + "/validation.pem" : "VALIDATOR-PEM-FILE" ,
230+ linuxConfDir + "/encrypted_data_bag_secret" :"SECRET-KEY-FILE" ,
219231 linuxConfDir + "/client.rb" : proxyLinuxClientConf ,
220232 linuxConfDir + "/first-boot.json" : `{"run_list":["cookbook::recipe"]}` ,
221233 },
@@ -250,6 +262,7 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
250262 "server_url" : "https://chef.local" ,
251263 "validation_client_name" : "validator" ,
252264 "validation_key_path" : "test-fixtures/validator.pem" ,
265+ "secret_key_path" : "test-fixtures/encrypted_data_bag_secret" ,
253266 }),
254267
255268 Commands : map [string ]bool {
@@ -258,6 +271,7 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
258271
259272 Uploads : map [string ]string {
260273 linuxConfDir + "/validation.pem" : "VALIDATOR-PEM-FILE" ,
274+ linuxConfDir + "/encrypted_data_bag_secret" : "SECRET-KEY-FILE" ,
261275 linuxConfDir + "/client.rb" : defaultLinuxClientConf ,
262276 linuxConfDir + "/first-boot.json" : `{"key1":{"subkey1":{"subkey2a":["val1","val2","val3"],` +
263277 `"subkey2b":{"subkey3":"value3"}}},"key2":"value2","run_list":["cookbook::recipe"]}` ,
0 commit comments