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:
1.1 KB
|
Line | |
---|
1 | require 'spec_helper'
|
---|
2 |
|
---|
3 | describe 'shell_split' do
|
---|
4 | it { is_expected.not_to eq(nil) }
|
---|
5 |
|
---|
6 | describe 'signature validation' do
|
---|
7 | it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
|
---|
8 | it { is_expected.to run.with_params('foo', 'bar').and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
|
---|
9 | end
|
---|
10 |
|
---|
11 | describe 'stringification' do
|
---|
12 | it { is_expected.to run.with_params(10).and_return(['10']) }
|
---|
13 | it { is_expected.to run.with_params(false).and_return(['false']) }
|
---|
14 | end
|
---|
15 |
|
---|
16 | describe 'shell line spliting' do
|
---|
17 | it { is_expected.to run.with_params('foo').and_return(['foo']) }
|
---|
18 | it { is_expected.to run.with_params('foo bar').and_return(['foo', 'bar']) }
|
---|
19 | it { is_expected.to run.with_params('\~\`\!@\#\$\%\^\&\*\(\)_\+-\=\[\]\\\\\{\}\|\;\\\':\",./\<\>\?')
|
---|
20 | .and_return(['~`!@#$%^&*()_+-=[]\{}|;\':",./<>?']) }
|
---|
21 | it { is_expected.to run.with_params('\~\`\!@\#\$ \%\^\&\*\(\)_\+-\= \[\]\\\\\{\}\|\;\\\':\" ,./\<\>\?')
|
---|
22 | .and_return(['~`!@#$', '%^&*()_+-=', '[]\{}|;\':"', ',./<>?']) }
|
---|
23 | end
|
---|
24 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.