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.0 KB
|
Line | |
---|
1 | require 'spec_helper'
|
---|
2 |
|
---|
3 | if Puppet.version.to_f >= 4.5
|
---|
4 | describe 'test::httpurl', type: :class do
|
---|
5 | describe 'valid handling' do
|
---|
6 | %w{
|
---|
7 | https://hello.com
|
---|
8 | https://notcreative.org
|
---|
9 | https://canstillaccepthttps.co.uk
|
---|
10 | http://anhttp.com
|
---|
11 | http://runningoutofideas.gov
|
---|
12 | http://
|
---|
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 | "hptts:/nah",
|
---|
32 | "https;//notrightbutclose.org"
|
---|
33 | ].each do |value|
|
---|
34 | describe value.inspect do
|
---|
35 | let(:params) {{ value: value }}
|
---|
36 | it { is_expected.to compile.and_raise_error(/parameter 'value' expects a match for Stdlib::HTTPUrl/) }
|
---|
37 | end
|
---|
38 | end
|
---|
39 | end
|
---|
40 |
|
---|
41 | end
|
---|
42 | end
|
---|
43 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.