source: other-projects/hathitrust/vagrant-solr-cluster/trunk/modules/stdlib/spec/aliases/ipv4_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: 843 bytes
Line 
1require 'spec_helper'
2
3if Puppet.version.to_f >= 4.5
4 describe 'test::ipv4', type: :class do
5 describe 'accepts ipv4 addresses' do
6 [
7 '224.0.0.0',
8 '255.255.255.255',
9 '0.0.0.0',
10 '192.88.99.0'
11 ].each do |value|
12 describe value.inspect do
13 let(:params) {{ value: value }}
14 it { is_expected.to compile }
15 end
16 end
17 end
18 describe 'rejects other values' do
19 [
20 'nope',
21 '77',
22 '4.4.4',
23 '2001:0db8:85a3:0000:0000:8a2e:0370:73342001:0db8:85a3:0000:0000:8a2e:0370:7334'
24 ].each do |value|
25 describe value.inspect do
26 let(:params) {{ value: value }}
27 it { is_expected.to compile.and_raise_error(/parameter 'value' expects a match for Stdlib::Compat::Ipv4/) }
28 end
29 end
30 end
31 end
32end
Note: See TracBrowser for help on using the repository browser.