Skip to content

Commit

Permalink
test(config_spec): workaround spurious whitespace issues on CentOS
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Apr 6, 2020
1 parent 0ae0a66 commit f4e12c5
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions test/integration/default/controls/config_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Overide by platform
# Default values
config_filename = '/etc/dhcp/dhcpd.conf'
rootgroup = 'root'
spurious_whitespace = ''
# Overide by platform
case platform[:family]
when 'debian'
service_config_filename = '/etc/default/isc-dhcp-server'
Expand Down Expand Up @@ -28,6 +30,12 @@
ExecStart=
ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid em1 em2
SERVICE_CONFIG_FILE
# Additionally, set the spurious whitespace for CentOS
# TODO: This needs to be fixed in the formula and then removed from here
case platform[:name]
when 'centos'
spurious_whitespace = ' '
end
when 'suse'
config_filename = '/etc/dhcpd.conf'
when 'freebsd'
Expand Down Expand Up @@ -127,7 +135,7 @@ class "foo" {
default-lease-time 600;
max-lease-time 7200;
option routers 10.5.5.1;
#{spurious_whitespace}
# Hosts can be specified for subnets, taking subnets defaults
host jake {
hardware ethernet 08:00:a7:26:c0:a9;
Expand Down Expand Up @@ -167,11 +175,11 @@ class "foo" {
}
shared-network 224-29 {
#{spurious_whitespace}
subnet 10.17.224.0 netmask 255.255.255.0 {
option routers rtr-224.example.org;
}
#{spurious_whitespace}
subnet 10.0.29.0 netmask 255.255.255.0 {
option routers rtr-29.example.org;
}
Expand Down

0 comments on commit f4e12c5

Please sign in to comment.