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:
986 bytes
|
Line | |
---|
1 | require 'spec_helper'
|
---|
2 |
|
---|
3 | if Puppet.version.to_f >= 4.5
|
---|
4 | describe 'test::httpsurl', type: :class do
|
---|
5 | describe 'valid handling' do
|
---|
6 | %w{
|
---|
7 | https://hello.com
|
---|
8 | https://notcreative.org
|
---|
9 | https://notexciting.co.uk
|
---|
10 | }.each do |value|
|
---|
11 | describe value.inspect do
|
---|
12 | let(:params) {{ value: value }}
|
---|
13 | it { is_expected.to compile }
|
---|
14 | end
|
---|
15 | end
|
---|
16 | end
|
---|
17 |
|
---|
18 | describe 'invalid path handling' do
|
---|
19 | context 'garbage inputs' do
|
---|
20 | [
|
---|
21 | nil,
|
---|
22 | [ nil ],
|
---|
23 | [ nil, nil ],
|
---|
24 | { 'foo' => 'bar' },
|
---|
25 | { },
|
---|
26 | '',
|
---|
27 | "httds://notquiteright.org",
|
---|
28 | "hptts:/nah",
|
---|
29 | "https;//notrightbutclose.org"
|
---|
30 | ].each do |value|
|
---|
31 | describe value.inspect do
|
---|
32 | let(:params) {{ value: value }}
|
---|
33 | it { is_expected.to compile.and_raise_error(/parameter 'value' expects a match for Stdlib::HTTPSUrl/) }
|
---|
34 | end
|
---|
35 | end
|
---|
36 | end
|
---|
37 |
|
---|
38 | end
|
---|
39 | end
|
---|
40 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.