aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-01-25 02:29:17 +0000
committerGerrit Code Review <review@openstack.org>2017-01-25 02:29:17 +0000
commitd89ba57f591166f9c90504fa0fbd12f452446444 (patch)
tree0e09a3472675738ac2e6c58b3cf7e41dc95738e1 /spec
parent947c4933743af9c8d220a45b09810fcf01c9aa04 (diff)
parent2f038b30e8f306d59f7e14471d88d7616026c6ff (diff)
Merge "Make sure we bind the rabbit inter-cluster to a specific interface"
Diffstat (limited to 'spec')
-rw-r--r--spec/functions/ip_to_erl_format_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/functions/ip_to_erl_format_spec.rb b/spec/functions/ip_to_erl_format_spec.rb
new file mode 100644
index 0000000..b587164
--- /dev/null
+++ b/spec/functions/ip_to_erl_format_spec.rb
@@ -0,0 +1,11 @@
+require 'spec_helper'
+require 'puppet'
+
+describe 'ip_to_erl_format' do
+ it { should run.with_params('192.168.2.1').and_return('{192,168,2,1}') }
+ it { should run.with_params('0.0.0.0').and_return('{0,0,0,0}') }
+ it { should run.with_params('5a40:79cf:8251:5dc5:1624:3c03:3c04:9ba8').and_return('{23104,31183,33361,24005,5668,15363,15364,39848}') }
+ it { should run.with_params('fe80::204:acff:fe17:bf38').and_return('{65152,0,0,0,516,44287,65047,48952}') }
+ it { should run.with_params('::1:2').and_return('{0,0,0,0,0,0,1,2}') }
+ it { should run.with_params('192.256.0.0').and_raise_error(IPAddr::InvalidAddressError) }
+end