
In 2940279 management of the apache vhost was split into a separate class and the vhost_name parameter was removed from the bandersnatch::mirror class. This wasn't done in a backwards compatible way and the acceptance tests were never updated to use the new API. Additionally, a88c399 split the bandersnatch cron job out of the mirror class into its own class, so the test for the existence of the job was failing. This patch updates the tests to use the new classes and to stop using the now invalid parameter. We also relax some of the internal system assertions and opt instead for checking that the service is working correctly by curling the endpoints and checking the contents. This exposed an issue on CentOS where selinux was not allowing apache to serve the robots.txt file, so also added an selinux rule to the fixture. Change-Id: If724c51b72f634a95bbffd080a9d33234a5d7645
23 lines
510 B
Puppet
23 lines
510 B
Puppet
class { '::bandersnatch':
|
|
}
|
|
|
|
class { '::bandersnatch::cron':
|
|
}
|
|
|
|
class { '::bandersnatch::httpd':
|
|
vhost_name => '127.0.0.1',
|
|
}
|
|
|
|
class { '::bandersnatch::mirror':
|
|
require => Class['::bandersnatch'],
|
|
}
|
|
|
|
if $::osfamily == 'RedHat' {
|
|
exec { 'manage selinux':
|
|
command => 'semanage fcontext -a -t httpd_sys_content_t "/srv/static(/.*)?" && restorecon -R -v /srv',
|
|
unless => 'ls -lZ /srv | grep httpd_sys_content_t',
|
|
path => '/bin:/sbin',
|
|
require => Class['::bandersnatch::mirror'],
|
|
}
|
|
}
|