Last change
on this file since 30960 was 30960, checked in by davidb, 8 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:
970 bytes
|
Rev | Line | |
---|
[30960] | 1 | #! /usr/bin/env ruby -S rspec
|
---|
| 2 | require 'spec_helper_acceptance'
|
---|
| 3 |
|
---|
| 4 | describe 'is_mac_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
|
---|
| 5 | describe 'success' do
|
---|
| 6 | it 'is_mac_addresss a mac' do
|
---|
| 7 | pp = <<-EOS
|
---|
| 8 | $a = '00:a0:1f:12:7f:a0'
|
---|
| 9 | $b = true
|
---|
| 10 | $o = is_mac_address($a)
|
---|
| 11 | if $o == $b {
|
---|
| 12 | notify { 'output correct': }
|
---|
| 13 | }
|
---|
| 14 | EOS
|
---|
| 15 |
|
---|
| 16 | apply_manifest(pp, :catch_failures => true) do |r|
|
---|
| 17 | expect(r.stdout).to match(/Notice: output correct/)
|
---|
| 18 | end
|
---|
| 19 | end
|
---|
| 20 | it 'is_mac_addresss a mac out of range' do
|
---|
| 21 | pp = <<-EOS
|
---|
| 22 | $a = '00:a0:1f:12:7f:g0'
|
---|
| 23 | $b = false
|
---|
| 24 | $o = is_mac_address($a)
|
---|
| 25 | if $o == $b {
|
---|
| 26 | notify { 'output correct': }
|
---|
| 27 | }
|
---|
| 28 | EOS
|
---|
| 29 |
|
---|
| 30 | apply_manifest(pp, :catch_failures => true) do |r|
|
---|
| 31 | expect(r.stdout).to match(/Notice: output correct/)
|
---|
| 32 | end
|
---|
| 33 | end
|
---|
| 34 | end
|
---|
| 35 | describe 'failure' do
|
---|
| 36 | it 'handles improper argument counts'
|
---|
| 37 | end
|
---|
| 38 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.