Skip to content

Commit 3f44898

Browse files
Cicco0kenyon
authored andcommitted
Add tests for missing ssl directive
1 parent 6c3169f commit 3f44898

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

spec/defines/resource_mailhost_spec.rb

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@
559559
title: 'should enable IPv6',
560560
attr: 'ipv6_enable',
561561
value: true,
562-
match: ' listen [::]:587 default ipv6only=on;'
562+
match: ' listen [::]:587 ssl default ipv6only=on;'
563563
},
564564
{
565565
title: 'should not enable IPv6',
@@ -571,19 +571,19 @@
571571
title: 'should set the IPv6 listen IP',
572572
attr: 'ipv6_listen_ip',
573573
value: '2001:0db8:85a3:0000:0000:8a2e:0370:7334',
574-
match: ' listen [2001:0db8:85a3:0000:0000:8a2e:0370:7334]:587 default ipv6only=on;'
574+
match: ' listen [2001:0db8:85a3:0000:0000:8a2e:0370:7334]:587 ssl default ipv6only=on;'
575575
},
576576
{
577577
title: 'should set the IPv6 ssl port',
578578
attr: 'ssl_port',
579579
value: 45,
580-
match: ' listen [::]:45 default ipv6only=on;'
580+
match: ' listen [::]:45 ssl default ipv6only=on;'
581581
},
582582
{
583583
title: 'should set the IPv6 listen options',
584584
attr: 'ipv6_listen_options',
585585
value: 'spdy',
586-
match: ' listen [::]:587 spdy;'
586+
match: ' listen [::]:587 ssl spdy;'
587587
},
588588
{
589589
title: 'should set servername(s)',
@@ -695,6 +695,11 @@
695695
content = catalogue.resource('concat::fragment', "#{title}-ssl").send(:parameters)[:content]
696696
expect(content).to include('listen *:587 ssl;')
697697
end
698+
699+
it 'contains `ssl` in the listen directive for ipv6' do
700+
content = catalogue.resource('concat::fragment', "#{title}-ssl").send(:parameters)[:content]
701+
expect(content).to include('listen [::]:587 ssl default ipv6only=on;')
702+
end
698703
end
699704

700705
context 'when version comes from parameter' do
@@ -704,6 +709,11 @@
704709
content = catalogue.resource('concat::fragment', "#{title}-ssl").send(:parameters)[:content]
705710
expect(content).to include('listen *:587 ssl;')
706711
end
712+
713+
it 'contains `ssl` in the listen directive for ipv6' do
714+
content = catalogue.resource('concat::fragment', "#{title}-ssl").send(:parameters)[:content]
715+
expect(content).to include('listen [::]:587 ssl default ipv6only=on;')
716+
end
707717
end
708718

709719
context 'mail proxy parameters' do

0 commit comments

Comments
 (0)