Skip to content

Commit f74cebc

Browse files
author
Kevin Paulisse
committed
Add some static files so compare file text will be exercised too
1 parent 89f6433 commit f74cebc

9 files changed

Lines changed: 23 additions & 3 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bar one

spec/octocatalog-diff/fixtures/repos/preserve-environments/environments/one/modules/bar/manifests/init.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@
55
owner => 'one',
66
content => $::environment,
77
}
8+
9+
file { '/tmp/bar-static.txt':
10+
source => 'puppet:///modules/bar/bar-static.txt',
11+
}
812
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bar two

spec/octocatalog-diff/fixtures/repos/preserve-environments/environments/two/modules/bar/manifests/init.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@
55
owner => 'two',
66
content => $::environment,
77
}
8+
9+
file { '/tmp/bar-static.txt':
10+
source => 'puppet:///modules/bar/bar-static.txt',
11+
}
812
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello there!

spec/octocatalog-diff/fixtures/repos/preserve-environments/modules/foo/manifests/init.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@
33
owner => 'foo',
44
content => $::environment,
55
}
6+
7+
file { '/tmp/foo-static.txt':
8+
source => 'puppet:///modules/foo/foo-static.txt',
9+
}
610
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Site test

spec/octocatalog-diff/fixtures/repos/preserve-environments/site/sitetest/manifests/init.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@
33
owner => 'sitetest',
44
content => $::environment,
55
}
6+
7+
file { '/tmp/sitetest-static.txt':
8+
source => 'puppet:///site/sitetest/sitetest-static.txt',
9+
}
610
}

spec/octocatalog-diff/integration/preserve_environments_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
end
5353

5454
it 'should log warning about --environment being useless in this context' do
55-
expect(@result.logs).to match(/WARN -- : --environment is ignored unless --preserve-environment is used/)
55+
expect(@result.logs).to match(/WARN -- : --environment is ignored unless --preserve-environments is used/)
5656
end
5757
end
5858

@@ -77,7 +77,7 @@
7777
end
7878

7979
it 'should log warning about --create-symlinks being useless in this context' do
80-
expect(@result.logs).to match(/WARN -- : --create-symlinks is ignored unless --preserve-environment is used/)
80+
expect(@result.logs).to match(/WARN -- : --create-symlinks is ignored unless --preserve-environments is used/)
8181
end
8282
end
8383
end
@@ -294,7 +294,7 @@
294294
it 'should error on missing site directory' do
295295
expect(@result.exitcode).to eq(-1), OctocatalogDiff::Integration.format_exception(@result)
296296
expect(@result.exception).to be_a_kind_of(OctocatalogDiff::CatalogDiff::Cli::Catalogs::CatalogError)
297-
expect(@result.exception.message).to match(%r{Could not find class (::)?sitetest.+ at .+/environments/two/})
297+
expect(@result.exception.message).to match(/Could not find class (::)?sitetest.+ at/)
298298
end
299299
end
300300
end

0 commit comments

Comments
 (0)