Skip to content

Commit

Permalink
Refs #30436 - move tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylenz committed Dec 1, 2020
1 parent 5767d64 commit f10d04f
Showing 1 changed file with 50 additions and 48 deletions.
98 changes: 50 additions & 48 deletions spec/classes/pulpcore_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,56 @@
is_expected.to contain_file('/var/lib/pulp/upload')
end

context 'with allowed import paths' do
let :params do
{
allowed_import_path: ['/test/path', '/test/path2'],
}
end

it do
is_expected.to compile.with_all_deps
is_expected.to contain_concat__fragment('base')
.with_content(%r{ALLOWED_IMPORT_PATHS = \["/test/path", "/test/path2"\]})

end
end

context 'with empty allowed import paths' do
it do
is_expected.to compile.with_all_deps
is_expected.to contain_concat__fragment('base')
.with_content(%r{ALLOWED_IMPORT_PATHS = \["/var/lib/pulp/sync_imports"\]})

end
end

context 'with allowed export paths' do
let :params do
{
allowed_export_path: ['/test/path', '/test/path2'],
}
end

it do
is_expected.to compile.with_all_deps
is_expected.to contain_concat__fragment('base')
.with_content(%r{ALLOWED_EXPORT_PATHS = \["/test/path", "/test/path2"\]})

end
end

context 'with empty allowed export paths' do
it do
is_expected.to compile.with_all_deps
is_expected.to contain_concat__fragment('base')
.with_content(%r{ALLOWED_EXPORT_PATHS = \[\]})

end
end



it 'sets up static files' do
is_expected.to contain_class('pulpcore::static')
is_expected.to contain_file('/var/lib/pulp/assets')
Expand Down Expand Up @@ -323,54 +373,6 @@
end
end

context 'with allowed import paths' do
let :params do
{
allowed_import_path: ['/test/path', '/test/path2'],
}
end

it do
is_expected.to compile.with_all_deps
is_expected.to contain_concat__fragment('base')
.with_content(%r{ALLOWED_IMPORT_PATHS = \["/test/path", "/test/path2"\]})

end
end

context 'with empty allowed import paths' do
it do
is_expected.to compile.with_all_deps
is_expected.to contain_concat__fragment('base')
.with_content(%r{ALLOWED_IMPORT_PATHS = \["/var/lib/pulp/sync_imports"\]})

end
end

context 'with allowed export paths' do
let :params do
{
allowed_export_path: ['/test/path', '/test/path2'],
}
end

it do
is_expected.to compile.with_all_deps
is_expected.to contain_concat__fragment('base')
.with_content(%r{ALLOWED_EXPORT_PATHS = \["/test/path", "/test/path2"\]})

end
end

context 'with empty allowed export paths' do
it do
is_expected.to compile.with_all_deps
is_expected.to contain_concat__fragment('base')
.with_content(%r{ALLOWED_EXPORT_PATHS = \[\]})

end
end

context 'with custom static dirs' do
let :params do
{
Expand Down

0 comments on commit f10d04f

Please sign in to comment.