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
|
-
Property svn:executable
set to
*
|
File size:
751 bytes
|
Line | |
---|
1 | #! /usr/bin/env ruby -S rspec
|
---|
2 | require 'spec_helper_acceptance'
|
---|
3 |
|
---|
4 | describe 'validate_absolute_path function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
|
---|
5 | describe 'success' do
|
---|
6 | %w{
|
---|
7 | C:/
|
---|
8 | C:\\\\
|
---|
9 | C:\\\\WINDOWS\\\\System32
|
---|
10 | C:/windows/system32
|
---|
11 | X:/foo/bar
|
---|
12 | X:\\\\foo\\\\bar
|
---|
13 | /var/tmp
|
---|
14 | /var/lib/puppet
|
---|
15 | /var/opt/../lib/puppet
|
---|
16 | }.each do |path|
|
---|
17 | it "validates a single argument #{path}" do
|
---|
18 | pp = <<-EOS
|
---|
19 | $one = '#{path}'
|
---|
20 | validate_absolute_path($one)
|
---|
21 | EOS
|
---|
22 |
|
---|
23 | apply_manifest(pp, :catch_failures => true)
|
---|
24 | end
|
---|
25 | end
|
---|
26 | end
|
---|
27 | describe 'failure' do
|
---|
28 | it 'handles improper number of arguments'
|
---|
29 | it 'handles relative paths'
|
---|
30 | end
|
---|
31 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.