Parcourir la source

fix(freebsd): fix `default` suite implementation and tests

tags/v1.1.2
Imran Iqbal il y a 3 ans
Parent
révision
0a0f69ee2f
Aucun compte lié à l'adresse e-mail de l'auteur
3 fichiers modifiés avec 14 ajouts et 4 suppressions
  1. +4
    -0
      apache/files/FreeBSD/apache-2.4.config.jinja
  2. +2
    -0
      apache/osfamilymap.yaml
  3. +8
    -4
      test/integration/default/controls/config_spec.rb

+ 4
- 0
apache/files/FreeBSD/apache-2.4.config.jinja Voir le fichier

@@ -1,3 +1,7 @@
#
# This file is managed by Salt! Do not edit by hand!
#

#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.

+ 2
- 0
apache/osfamilymap.yaml Voir le fichier

@@ -202,7 +202,9 @@ FreeBSD:
confext: ''
default_site: default
default_site_ssl: default-ssl
moddir: /usr/local/etc/apache24/modules.d
logdir: /var/log/
logrotatedir: /usr/local/etc/logrotate.d/apache2
wwwdir: /usr/local/www/apache24/

OpenBSD:

+ 8
- 4
test/integration/default/controls/config_spec.rb Voir le fichier

@@ -28,9 +28,11 @@ control 'apache configuration' do
sitesdir = '/etc/httpd/sites-enabled'
when 'bsd'
vhostdir = '/usr/local/etc/apache24/Includes'
# logrotatedir = ?
# moddir = '?'
# sitesdir = '?'
logrotatedir = '/usr/local/etc/logrotate.d/apache2'
moddir = '/usr/local/etc/apache24/modules.d'
# https://docs.freebsd.org/en/books/handbook/network-servers/#_virtual_hosting
# All done under `/usr/local/etc/apache24/httpd.conf`
sitesdir = '/usr/local/etc/apache24'
end
describe file(vhostdir) do
it { should exist }
@@ -56,6 +58,7 @@ end
control 'apache configuration (unique)' do
title 'should be valid'

config_file_group = 'root'
case platform[:family]
when 'debian'
config_file = '/etc/apache2/apache2.conf'
@@ -74,11 +77,12 @@ control 'apache configuration (unique)' do
wwwdir = '/srv/http'
when 'bsd'
config_file = '/usr/local/etc/apache24/httpd.conf'
config_file_group = 'wheel'
wwwdir = '/usr/local/www/apache24/'
end
describe file(config_file) do
it { should be_file }
it { should be_grouped_into 'root' }
it { should be_grouped_into config_file_group }
its('mode') { should cmp '0644' }
its('content') do
should include(

Chargement…
Annuler
Enregistrer