source: other-projects/hathitrust/vagrant-hadoop-cluster/trunk/modules/stdlib/spec/aliases/windowspath_spec.rb@ 30903

Last change on this file since 30903 was 30903, checked in by davidb, 7 years ago

Vagrant provisioning files for a 4-node Hadoop cluster. See README.txt for more details

File size: 1.1 KB
Line 
1require 'spec_helper'
2
3if Puppet.version.to_f >= 4.5
4 describe 'test::windowspath', type: :class do
5 describe 'valid handling' do
6 %w{
7 C:\\
8 C:\\WINDOWS\\System32
9 C:/windows/system32
10 X:/foo/bar
11 X:\\foo\\bar
12 \\\\host\\windows
13 }.each do |value|
14 describe value.inspect do
15 let(:params) {{ value: value }}
16 it { is_expected.to compile }
17 end
18 end
19 end
20
21 describe 'invalid path handling' do
22 context 'garbage inputs' do
23 [
24 nil,
25 [ nil ],
26 [ nil, nil ],
27 { 'foo' => 'bar' },
28 { },
29 '',
30 "httds://notquiteright.org",
31 "/usr2/username/bin:/usr/local/bin:/usr/bin:.",
32 "C;//notright/here",
33 "C:noslashes"
34 ].each do |value|
35 describe value.inspect do
36 let(:params) {{ value: value }}
37 it { is_expected.to compile.and_raise_error(/parameter 'value' expects a match for Stdlib::Windowspath/) }
38 end
39 end
40 end
41
42 end
43 end
44end
Note: See TracBrowser for help on using the repository browser.