|
79 | 79 | context 'with weak hmacs enabled for the server' do |
80 | 80 | cached(:chef_run) do |
81 | 81 | ChefSpec::ServerRunner.new do |node| |
82 | | - node.set['ssh']['server']['weak_hmac'] = true |
| 82 | + node.normal['ssh']['server']['weak_hmac'] = true |
83 | 83 | end.converge(described_recipe) |
84 | 84 | end |
85 | 85 |
|
|
96 | 96 | context 'with weak hmacs enabled for only the client' do |
97 | 97 | cached(:chef_run) do |
98 | 98 | ChefSpec::ServerRunner.new do |node, server| |
99 | | - node.set['ssh']['server']['client']['weak_hmac'] = true |
| 99 | + node.normal['ssh']['server']['client']['weak_hmac'] = true |
100 | 100 | server.create_data_bag('users', 'someuser' => { id: 'someuser' }) |
101 | 101 | end.converge(described_recipe) |
102 | 102 | end |
|
110 | 110 | context 'weak_kex enabled for only the server' do |
111 | 111 | cached(:chef_run) do |
112 | 112 | ChefSpec::ServerRunner.new do |node| |
113 | | - node.set['ssh']['server']['weak_kex'] = true |
| 113 | + node.normal['ssh']['server']['weak_kex'] = true |
114 | 114 | end.converge(described_recipe) |
115 | 115 | end |
116 | 116 |
|
|
131 | 131 | context 'weak_kex enabled for only the client' do |
132 | 132 | cached(:chef_run) do |
133 | 133 | ChefSpec::ServerRunner.new do |node, server| |
134 | | - node.set['ssh']['client']['weak_kex'] = true |
| 134 | + node.normal['ssh']['client']['weak_kex'] = true |
135 | 135 | server.create_data_bag('users', 'someuser' => { id: 'someuser' }) |
136 | 136 | end.converge(described_recipe) |
137 | 137 | end |
|
149 | 149 | context 'cbc_required for the server only' do |
150 | 150 | cached(:chef_run) do |
151 | 151 | ChefSpec::ServerRunner.new do |node| |
152 | | - node.set['ssh']['server']['cbc_required'] = true |
| 152 | + node.normal['ssh']['server']['cbc_required'] = true |
153 | 153 | end.converge(described_recipe) |
154 | 154 | end |
155 | 155 |
|
|
168 | 168 | context 'cbc_required for the client only' do |
169 | 169 | cached(:chef_run) do |
170 | 170 | ChefSpec::ServerRunner.new do |node, server| |
171 | | - node.set['ssh']['client']['cbc_required'] = true |
| 171 | + node.normal['ssh']['client']['cbc_required'] = true |
172 | 172 | server.create_data_bag('users', 'someuser' => { id: 'someuser' }) |
173 | 173 | end.converge(described_recipe) |
174 | 174 | end |
|
184 | 184 | cached(:chef_run) do |
185 | 185 | ChefSpec::ServerRunner.new do |node, server| |
186 | 186 | server.create_data_bag('users', 'someuser' => { id: 'someuser' }) |
187 | | - node.set['ssh']['weak_hmac'] = true |
| 187 | + node.normal['ssh']['weak_hmac'] = true |
188 | 188 | end.converge(described_recipe) |
189 | 189 | end |
190 | 190 |
|
|
217 | 217 | context 'legacy attribute weak_kex set' do |
218 | 218 | cached(:chef_run) do |
219 | 219 | ChefSpec::ServerRunner.new do |node, server| |
220 | | - node.set['ssh']['weak_kex'] = true |
| 220 | + node.normal['ssh']['weak_kex'] = true |
221 | 221 | server.create_data_bag('users', 'someuser' => { id: 'someuser' }) |
222 | 222 | end.converge(described_recipe) |
223 | 223 | end |
|
251 | 251 | context 'legacy attribute cbc_required set' do |
252 | 252 | cached(:chef_run) do |
253 | 253 | ChefSpec::ServerRunner.new do |node, server| |
254 | | - node.set['ssh']['cbc_required'] = true |
| 254 | + node.normal['ssh']['cbc_required'] = true |
255 | 255 | server.create_data_bag('users', 'someuser' => { id: 'someuser' }) |
256 | 256 | end.converge(described_recipe) |
257 | 257 | end |
|
297 | 297 | # don't use cache, log persists |
298 | 298 | let(:chef_run) do |
299 | 299 | ChefSpec::ServerRunner.new do |node, server| |
300 | | - node.set['ssh'][attr] = true |
301 | | - node.set['ssh']['client'][attr] = true |
302 | | - node.set['ssh']['server'][attr] = false |
| 300 | + node.normal['ssh'][attr] = true |
| 301 | + node.normal['ssh']['client'][attr] = true |
| 302 | + node.normal['ssh']['server'][attr] = false |
303 | 303 | server.create_data_bag('users', 'someuser' => { id: 'someuser' }) |
304 | 304 | end.converge(described_recipe) |
305 | 305 | end |
|
315 | 315 | # don't use cache, log persists |
316 | 316 | let(:chef_run) do |
317 | 317 | ChefSpec::ServerRunner.new do |node, server| |
318 | | - node.set['ssh'][attr] = true |
319 | | - node.set['ssh']['client'][attr] = false |
320 | | - node.set['ssh']['server'][attr] = true |
| 318 | + node.normal['ssh'][attr] = true |
| 319 | + node.normal['ssh']['client'][attr] = false |
| 320 | + node.normal['ssh']['server'][attr] = true |
321 | 321 | server.create_data_bag('users', 'someuser' => { id: 'someuser' }) |
322 | 322 | end.converge(described_recipe) |
323 | 323 | end |
|
352 | 352 | context 'with attribute allow_root_with_key' do |
353 | 353 | cached(:chef_run) do |
354 | 354 | ChefSpec::ServerRunner.new do |node| |
355 | | - node.set['ssh']['allow_root_with_key'] = true |
| 355 | + node.normal['ssh']['allow_root_with_key'] = true |
356 | 356 | end.converge(described_recipe) |
357 | 357 | end |
358 | 358 |
|
|
449 | 449 | context 'with attribute deny_users' do |
450 | 450 | cached(:chef_run) do |
451 | 451 | ChefSpec::ServerRunner.new do |node| |
452 | | - node.set['ssh']['deny_users'] = %w(someuser) |
| 452 | + node.normal['ssh']['deny_users'] = %w(someuser) |
453 | 453 | end.converge(described_recipe) |
454 | 454 | end |
455 | 455 |
|
|
462 | 462 | context 'with attribute deny_users mutiple' do |
463 | 463 | cached(:chef_run) do |
464 | 464 | ChefSpec::ServerRunner.new do |node| |
465 | | - node.set['ssh']['deny_users'] = %w(someuser otheruser) |
| 465 | + node.normal['ssh']['deny_users'] = %w(someuser otheruser) |
466 | 466 | end.converge(described_recipe) |
467 | 467 | end |
468 | 468 |
|
|
482 | 482 | context 'with attribute use_dns set to false' do |
483 | 483 | cached(:chef_run) do |
484 | 484 | ChefSpec::ServerRunner.new do |node| |
485 | | - node.set['ssh']['use_dns'] = false |
| 485 | + node.normal['ssh']['use_dns'] = false |
486 | 486 | end.converge(described_recipe) |
487 | 487 | end |
488 | 488 |
|
|
495 | 495 | context 'with attribute use_dns set to true' do |
496 | 496 | cached(:chef_run) do |
497 | 497 | ChefSpec::ServerRunner.new do |node| |
498 | | - node.set['ssh']['use_dns'] = true |
| 498 | + node.normal['ssh']['use_dns'] = true |
499 | 499 | end.converge(described_recipe) |
500 | 500 | end |
501 | 501 |
|
|
515 | 515 | context 'with attribute ["sftp"]["enable"] set to true' do |
516 | 516 | cached(:chef_run) do |
517 | 517 | ChefSpec::ServerRunner.new do |node| |
518 | | - node.set['ssh']['sftp']['enable'] = true |
| 518 | + node.normal['ssh']['sftp']['enable'] = true |
519 | 519 | end.converge(described_recipe) |
520 | 520 | end |
521 | 521 |
|
|
528 | 528 | context 'with attribute ["sftp"]["enable"] set to true and ["sftp"]["group"] set to "testgroup"' do |
529 | 529 | cached(:chef_run) do |
530 | 530 | ChefSpec::ServerRunner.new do |node| |
531 | | - node.set['ssh']['sftp']['enable'] = true |
532 | | - node.set['ssh']['sftp']['group'] = 'testgroup' |
| 531 | + node.normal['ssh']['sftp']['enable'] = true |
| 532 | + node.normal['ssh']['sftp']['group'] = 'testgroup' |
533 | 533 | end.converge(described_recipe) |
534 | 534 | end |
535 | 535 |
|
|
542 | 542 | context 'with attribute ["sftp"]["enable"] set to true and ["sftp"]["chroot"] set to "/export/home/%u"' do |
543 | 543 | cached(:chef_run) do |
544 | 544 | ChefSpec::ServerRunner.new do |node| |
545 | | - node.set['ssh']['sftp']['enable'] = true |
546 | | - node.set['ssh']['sftp']['chroot'] = 'test_home_dir' |
| 545 | + node.normal['ssh']['sftp']['enable'] = true |
| 546 | + node.normal['ssh']['sftp']['chroot'] = 'test_home_dir' |
547 | 547 | end.converge(described_recipe) |
548 | 548 | end |
549 | 549 |
|
|
0 commit comments