Skip to content

Instantly share code, notes, and snippets.

@hlindberg
Created July 9, 2015 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hlindberg/2204c50a8a52da112682 to your computer and use it in GitHub Desktop.
Save hlindberg/2204c50a8a52da112682 to your computer and use it in GitHub Desktop.
<<<<<<< HEAD
it 'should exit with 0 when -assert equal is used and catalogs are equal due to exclude' do
env_path = File.join(testdir_simple, 'environments')
on master, puppet("preview --preview_environment compliant --assert equal --excludes #{testdir_simple}/files/excludes.json --migrate 3.8/4.0 #{node_names_cli.join(' ')} --nodes #{node_names_filename} --environmentpath #{env_path}"),
:acceptable_exit_codes => [0]
end
=======
context 'when using --assert equal with --excludes' do
it 'should exit with 0 when excluding attributes qualified with type, title, and attribute name' do
env_path = File.join(testdir_simple, 'environments')
on master, puppet("preview --preview_environment compliant --assert equal --excludes #{testdir_simple}/files/excludes.json --migrate 3.8/4.0 nonesuch --environmentpath #{env_path}"),
:acceptable_exit_codes => [0]
end
>>>>>>> refs/heads/stable
<<<<<<< HEAD
it 'should exit with 0 when -assert equal is used and catalogs are equal due to exclude with no title' do
env_path = File.join(testdir_simple, 'environments')
on master, puppet("preview --preview_environment compliant --assert equal --excludes #{testdir_simple}/files/excludes_wo_title.json --migrate 3.8/4.0 #{node_names_cli.join(' ')} --nodes #{node_names_filename} --environmentpath #{env_path}"),
:acceptable_exit_codes => [0]
end
=======
it 'should exit with 0 when excluding attributes qualified with type and attribute name' do
env_path = File.join(testdir_simple, 'environments')
on master, puppet("preview --preview_environment compliant --assert equal --excludes #{testdir_simple}/files/excludes_wo_title.json --migrate 3.8/4.0 nonesuch --environmentpath #{env_path}"),
:acceptable_exit_codes => [0]
end
>>>>>>> refs/heads/stable
<<<<<<< HEAD
it 'should exit with 0 when -assert equal is used and catalogs are equal due to exclude with no attributes' do
env_path = File.join(testdir_simple, 'environments')
on master, puppet("preview --preview_environment compliant --assert equal --excludes #{testdir_simple}/files/excludes_wo_attributes.json --migrate 3.8/4.0 #{node_names_cli.join(' ')} --nodes #{node_names_filename} --environmentpath #{env_path}"),
:acceptable_exit_codes => [0]
end
=======
it 'should exit with 0 when excluding conflicting resources qualified with type and title' do
env_path = File.join(testdir_simple, 'environments')
on master, puppet("preview --preview_environment compliant --assert equal --excludes #{testdir_simple}/files/excludes_wo_attributes.json --migrate 3.8/4.0 nonesuch --environmentpath #{env_path}"),
:acceptable_exit_codes => [0]
end
>>>>>>> refs/heads/stable
<<<<<<< HEAD
it 'should exit with 0 when -assert equal is used and catalogs are equal due to exclude with neither title nor attributes' do
env_path = File.join(testdir_simple, 'environments')
on master, puppet("preview --preview_environment compliant --assert equal --excludes #{testdir_simple}/files/excludes_wo_title_and_attributes.json --migrate 3.8/4.0 #{node_names_cli.join(' ')} --nodes #{node_names_filename} --environmentpath #{env_path}"),
:acceptable_exit_codes => [0]
=======
it 'should exit with 0 when excluding conflicting resources qualified with type' do
env_path = File.join(testdir_simple, 'environments')
on master, puppet("preview --preview_environment compliant --assert equal --excludes #{testdir_simple}/files/excludes_wo_title_and_attributes.json --migrate 3.8/4.0 nonesuch --environmentpath #{env_path}"),
:acceptable_exit_codes => [0]
end
it 'should exit with 0 when excluding missing resources qualified with type and title' do
env_path = File.join(testdir_simple, 'environments')
on master, puppet("preview --preview_environment missing --assert equal --excludes #{testdir_simple}/files/excludes_wo_attributes.json --migrate 3.8/4.0 nonesuch --environmentpath #{env_path}"),
:acceptable_exit_codes => [0]
end
it 'should exit with 0 when excluding missing resources qualified with type' do
env_path = File.join(testdir_simple, 'environments')
on master, puppet("preview --preview_environment missing --assert equal --excludes #{testdir_simple}/files/excludes_wo_title_and_attributes.json --migrate 3.8/4.0 nonesuch --environmentpath #{env_path}"),
:acceptable_exit_codes => [0]
end
it 'should exit with 0 when excluding added resources qualified with type and title' do
env_path = File.join(testdir_simple, 'environments')
on master, puppet("preview --preview_environment added --assert equal --excludes #{testdir_simple}/files/excludes_wo_attributes.json --migrate 3.8/4.0 nonesuch --environmentpath #{env_path}"),
:acceptable_exit_codes => [0]
end
it 'should exit with 0 when excluding added resources qualified with type' do
env_path = File.join(testdir_simple, 'environments')
on master, puppet("preview --preview_environment added --assert equal --excludes #{testdir_simple}/files/excludes_wo_title_and_attributes.json --migrate 3.8/4.0 nonesuch --environmentpath #{env_path}"),
:acceptable_exit_codes => [0]
end
>>>>>>> refs/heads/stable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment