Skip to content

Commit 73ab8ae

Browse files
committed
Ensure the test folder does exist
On the new CI machines, there is no local Administrator account, hence this test would fail without merit. This change fixes the tests to use a fresh directory and create it at the start of the test suite.
1 parent a217dc6 commit 73ab8ae

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

spec/acceptance/file_line_spec.rb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
require 'spec_helper_acceptance'
22

3-
test_file = (os[:family] == 'windows') ? 'C:\Users\Administrator\file_line_test.txt' : '/tmp/file_line_test.txt'
4-
53
describe 'file_line type' do
4+
let(:test_file) { (os[:family] == 'windows') ? 'C:\test\file_line_test.txt' : '/tmp/test/testfile_line_test.txt' }
5+
6+
before(:all) do
7+
apply_manifest(<<-MANIFEST)
8+
case($facts['os']['family']) {
9+
windows: { file { 'C:\\test': ensure => directory } }
10+
default: { file { '/tmp/test': ensure => directory } }
11+
}
12+
MANIFEST
13+
end
14+
615
before(:each) do
716
pp_test_file = <<-MANIFEST
817
file { '#{test_file}':

0 commit comments

Comments
 (0)