Showing with 40 additions and 6 deletions.
  1. +8 −0 CHANGELOG.md
  2. +14 −0 manifests/config.pp
  3. +1 −1 metadata.json
  4. +17 −5 spec/classes/pulpcore_spec.rb
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [2.2.1](https://github.com/theforeman/puppet-pulpcore/tree/2.2.1) (2020-12-09)

[Full Changelog](https://github.com/theforeman/puppet-pulpcore/compare/2.2.0...2.2.1)

**Fixed bugs:**

- Fixes [\#31468](https://projects.theforeman.org/issues/31468) - create import/export directories [\#156](https://github.com/theforeman/puppet-pulpcore/pull/156) ([jeremylenz](https://github.com/jeremylenz))

## [2.2.0](https://github.com/theforeman/puppet-pulpcore/tree/2.2.0) (2020-12-03)

[Full Changelog](https://github.com/theforeman/puppet-pulpcore/compare/2.1.0...2.2.0)
Expand Down
14 changes: 14 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,18 @@
mode => '0750',
}

file { $pulpcore::allowed_import_path:
ensure => directory,
owner => $pulpcore::user,
group => $pulpcore::group,
mode => '0770',
}

file { $pulpcore::allowed_export_path:
ensure => directory,
owner => $pulpcore::user,
group => $pulpcore::group,
mode => '0770',
}

}
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "theforeman-pulpcore",
"version": "2.2.0",
"version": "2.2.1",
"author": "theforeman",
"summary": "Installs next generation Pulp server",
"license": "GPL-3.0-or-later",
Expand Down
22 changes: 17 additions & 5 deletions spec/classes/pulpcore_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
.without_content(/sslmode/)
is_expected.to contain_file('/etc/pulp')
is_expected.to contain_file('/var/lib/pulp')
is_expected.to contain_file('/var/lib/pulp/sync_imports')
is_expected.to contain_file('/var/lib/pulp/assets')
is_expected.to contain_file('/var/lib/pulp/media')
is_expected.to contain_file('/var/lib/pulp/pulpcore_static')
Expand Down Expand Up @@ -119,29 +120,40 @@
context 'with allowed import paths' do
let :params do
{
allowed_import_path: ['/test/path', '/test/path2'],
allowed_import_path: ['/tmp/imports', '/tmp/imports1'],
}
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"\]})
.with_content(%r{ALLOWED_IMPORT_PATHS = \["/tmp/imports", "/tmp/imports1"\]})
is_expected.to contain_file('/tmp/imports1')
is_expected.to contain_file('/tmp/imports').with(
:mode => '0770',
:owner => 'pulp',
:group => 'pulp'
)
end
end

context 'with allowed export paths' do
let :params do
{
allowed_export_path: ['/test/path', '/test/path2'],
allowed_export_path: ['/tmp/exports', '/tmp/exports1'],
}
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"\]})

.with_content(%r{ALLOWED_EXPORT_PATHS = \["/tmp/exports", "/tmp/exports1"\]})
is_expected.to contain_file('/tmp/exports1')
is_expected.to contain_file('/tmp/exports').with(
:mode => '0770',
:owner => 'pulp',
:group => 'pulp'
)
end
end

Expand Down