source: other-projects/hathitrust/vagrant-solr-cluster/trunk/modules/stdlib/spec/aliases/ipv6_spec.rb@ 30960

Last change on this file since 30960 was 30960, checked in by davidb, 7 years ago

Switch to using Puppet to provision machine. Strongly based on files developed for spark-hdfs cluster

File size: 786 bytes
Line 
1require 'spec_helper'
2
3if Puppet.version.to_f >= 4.5
4 describe 'test::ipv6', type: :class do
5 describe 'accepts ipv6 addresses' do
6 [
7 '2001:0db8:85a3:0000:0000:8a2e:0370:7334',
8 'fa76:8765:34ac:0823:ab76:eee9:0987:1111'
9 ].each do |value|
10 describe value.inspect do
11 let(:params) {{ value: value }}
12 it { is_expected.to compile }
13 end
14 end
15 end
16 describe 'rejects other values' do
17 [
18 'nope',
19 '77',
20 '4.4.4',
21 '2000:7334'
22 ].each do |value|
23 describe value.inspect do
24 let(:params) {{ value: value }}
25 it { is_expected.to compile.and_raise_error(/parameter 'value' expects a match for Stdlib::Compat::Ipv6/) }
26 end
27 end
28 end
29 end
30end
Note: See TracBrowser for help on using the repository browser.