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
|
-
Property svn:executable
set to
*
|
File size:
1.0 KB
|
Line | |
---|
1 | #! /usr/bin/env ruby -S rspec
|
---|
2 | require 'spec_helper_acceptance'
|
---|
3 |
|
---|
4 | describe 'has_ip_address function', :unless => ((UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))) or (fact('osfamily') == 'windows') or (fact('osfamily') == 'AIX')) do
|
---|
5 | describe 'success' do
|
---|
6 | it 'has_ip_address existing ipaddress' do
|
---|
7 | pp = <<-EOS
|
---|
8 | $a = '127.0.0.1'
|
---|
9 | $o = has_ip_address($a)
|
---|
10 | notice(inline_template('has_ip_address is <%= @o.inspect %>'))
|
---|
11 | EOS
|
---|
12 |
|
---|
13 | apply_manifest(pp, :catch_failures => true) do |r|
|
---|
14 | expect(r.stdout).to match(/has_ip_address is true/)
|
---|
15 | end
|
---|
16 | end
|
---|
17 | it 'has_ip_address absent ipaddress' do
|
---|
18 | pp = <<-EOS
|
---|
19 | $a = '128.0.0.1'
|
---|
20 | $o = has_ip_address($a)
|
---|
21 | notice(inline_template('has_ip_address is <%= @o.inspect %>'))
|
---|
22 | EOS
|
---|
23 |
|
---|
24 | apply_manifest(pp, :catch_failures => true) do |r|
|
---|
25 | expect(r.stdout).to match(/has_ip_address is false/)
|
---|
26 | end
|
---|
27 | end
|
---|
28 | end
|
---|
29 | describe 'failure' do
|
---|
30 | it 'handles no arguments'
|
---|
31 | it 'handles non strings'
|
---|
32 | end
|
---|
33 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.