|
519 | 519 | should contain_file('rabbitmq.config').with_content(%r{certfile,"/path/to/cert"}) |
520 | 520 | should contain_file('rabbitmq.config').with_content(%r{keyfile,"/path/to/key}) |
521 | 521 | should contain_file('rabbitmq.config').with_content(%r{ssl, \[\{versions, \['tlsv1.1', 'tlsv1.2'\]\}\]}) |
| 522 | + should contain_file('rabbitmq.config').with_content(%r{versions, \['tlsv1.1', 'tlsv1.2'\]}) |
522 | 523 | end |
523 | 524 | end |
524 | 525 |
|
|
552 | 553 | end |
553 | 554 | end |
554 | 555 |
|
| 556 | + describe 'ssl admin options with specific ssl versions' do |
| 557 | + let(:params) { |
| 558 | + { :ssl => true, |
| 559 | + :ssl_management_port => 5926, |
| 560 | + :ssl_cacert => '/path/to/cacert', |
| 561 | + :ssl_cert => '/path/to/cert', |
| 562 | + :ssl_key => '/path/to/key', |
| 563 | + :ssl_versions => ['tlsv1.2', 'tlsv1.1'], |
| 564 | + :admin_enable => true |
| 565 | + } } |
| 566 | + |
| 567 | + it 'should set admin ssl opts to specified values' do |
| 568 | + should contain_file('rabbitmq.config').with_content(%r{rabbitmq_management, \[}) |
| 569 | + should contain_file('rabbitmq.config').with_content(%r{listener, \[}) |
| 570 | + should contain_file('rabbitmq.config').with_content(%r{port, 5926\}}) |
| 571 | + should contain_file('rabbitmq.config').with_content(%r{ssl, true\}}) |
| 572 | + should contain_file('rabbitmq.config').with_content(%r{ssl_opts, \[\{cacertfile, "/path/to/cacert"\},}) |
| 573 | + should contain_file('rabbitmq.config').with_content(%r{certfile, "/path/to/cert"\},}) |
| 574 | + should contain_file('rabbitmq.config').with_content(%r{keyfile, "/path/to/key"\}}) |
| 575 | + should contain_file('rabbitmq.config').with_content(%r{,\{versions, \['tlsv1.1', 'tlsv1.2'\]\}[\r\n ]*\]\}}) |
| 576 | + end |
| 577 | + end |
| 578 | + |
555 | 579 | describe 'ssl admin options' do |
556 | 580 | let(:params) { |
557 | 581 | { :ssl => true, |
|
569 | 593 | should contain_file('rabbitmq.config').with_content(%r{ssl, true\}}) |
570 | 594 | should contain_file('rabbitmq.config').with_content(%r{ssl_opts, \[\{cacertfile, "/path/to/cacert"\},}) |
571 | 595 | should contain_file('rabbitmq.config').with_content(%r{certfile, "/path/to/cert"\},}) |
572 | | - should contain_file('rabbitmq.config').with_content(%r{keyfile, "/path/to/key"\}\]\}}) |
| 596 | + should contain_file('rabbitmq.config').with_content(%r{keyfile, "/path/to/key"\}[\r\n ]*\]\}}) |
573 | 597 | end |
574 | 598 | end |
575 | 599 |
|
|
604 | 628 | should contain_file('rabbitmq.config').with_content(%r{ssl, true\},}) |
605 | 629 | should contain_file('rabbitmq.config').with_content(%r{ssl_opts, \[\{cacertfile, "/path/to/cacert"\},}) |
606 | 630 | should contain_file('rabbitmq.config').with_content(%r{certfile, "/path/to/cert"\},}) |
607 | | - should contain_file('rabbitmq.config').with_content(%r{keyfile, "/path/to/key"\}\]\}}) |
| 631 | + should contain_file('rabbitmq.config').with_content(%r{keyfile, "/path/to/key"\}[\r\n ]*\]\}}) |
608 | 632 | end |
609 | 633 | end |
610 | 634 |
|
|
0 commit comments