Skip to content

Commit

Permalink
ci(travis+inspec): test debian-10 as well
Browse files Browse the repository at this point in the history
* Semi-automated using myii/ssf-formula#162
  • Loading branch information
myii committed Apr 21, 2020
1 parent db49764 commit 9b2bab5
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
## Define the rest of the matrix based on Kitchen testing
# Make sure the instances listed below match up with
# the `platforms` defined in `kitchen.yml`
# - env: INSTANCE=tomcat-install-debian-10-master-py3
- env: INSTANCE=tomcat-install-debian-10-master-py3
- env: INSTANCE=tomcat-install-ubuntu-1804-master-py3
# - env: INSTANCE=tomcat-extend-ubuntu-1804-master-py3
# - env: INSTANCE=tomcat-install-centos-8-master-py3
Expand Down
2 changes: 1 addition & 1 deletion .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ignore: |
node_modules/
test/**/states/**/*.sls
.kitchen/
tomcat/osmap.yaml
tomcat/osfamilymap.yaml
yaml-files:
# Default settings
Expand Down
7 changes: 6 additions & 1 deletion test/integration/tomcat_install/controls/packages_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
packages =
case platform[:family]
when 'debian'
%w[tomcat8 haveged]
case platform[:release]
when /^10/
%w[tomcat9 haveged]
else
%w[tomcat8 haveged]
end
when 'redhat', 'fedora', 'suse'
%w[tomcat]
end
Expand Down
7 changes: 6 additions & 1 deletion test/integration/tomcat_install/controls/services_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
services =
case platform[:family]
when 'debian'
%w[tomcat8 haveged]
case platform[:release]
when /^10/
%w[tomcat9 haveged]
else
%w[tomcat8 haveged]
end
when 'redhat', 'fedora', 'suse'
%w[tomcat]
end
Expand Down
39 changes: 31 additions & 8 deletions test/integration/tomcat_install/controls/yaml_dump_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,36 @@
yaml_dump +=
case platform[:family]
when 'debian'
case platform[:release]
when /^10/
conf_dir = '/etc/tomcat9'
group = 'tomcat'
main_config = '/etc/default/tomcat9'
manager_pkg = 'tomcat9-admin'
pkg = 'tomcat9'
service = 'tomcat9'
user = 'tomcat'
ver = 9
else
conf_dir = '/etc/tomcat8'
group = 'tomcat8'
main_config = '/etc/default/tomcat8'
manager_pkg = 'tomcat8-admin'
pkg = 'tomcat8'
service = 'tomcat8'
user = 'tomcat8'
ver = 8
end
<<~YAML_DUMP.chomp
arch: amd64
authbind: 'no'
catalina_base: /usr/share/tomcat
catalina_home: /usr/share/tomcat
catalina_pid: /var/run/tomcat.pid
catalina_tmpdir: /var/cache/tomcat/temp
cluster:
simple: true
conf_dir: /etc/tomcat8
conf_dir: #{conf_dir}
connectors:
example_connector:
port: 8443
Expand Down Expand Up @@ -72,7 +93,7 @@
global: simpleValue
type: java.lang.Integer
expires_when: 2 weeks
group: tomcat8
group: #{group}
haveged_enabled: true
id:
- example.com
Expand All @@ -91,7 +112,7 @@
soft: 64000
logfile_compress: 1
logfile_days: 14
main_config: /etc/default/tomcat8
main_config: #{main_config}
main_config_template: salt://tomcat/files/tomcat-default-Debian.template
manager:
roles:
Expand All @@ -110,7 +131,7 @@
- manager-script
- manager-jmx
- manager-status
manager_pkg: tomcat8-admin
manager_pkg: #{manager_pkg}
native_pkg: libtcnative-1
other_contexts:
other-contexts:
Expand All @@ -137,10 +158,10 @@
className: org.apache.catalina.webresources.DirResourceSet
base: /var/lib/tomcat8/appconfig
webAppMount: /WEB-INF/classes
pkg: tomcat8
pkg: #{pkg}
resources: {}
security: 'no'
service: tomcat8
service: #{service}
service_enabled: true
service_running: false
sites:
Expand Down Expand Up @@ -175,12 +196,13 @@
pattern: '%h %l %u %t &quot;%m http://%v%U %H&quot; %s %b &quot;%{Referer}i&quot;
&quot;%{User-Agent}i&quot; %D'
- className: org.apache.catalina.authenticator.SingleSignOn
user: tomcat8
ver: 8
user: #{user}
ver: #{ver}
with_haveged: true
YAML_DUMP
when 'redhat', 'fedora'
<<~YAML_DUMP.chomp
arch: amd64
authbind: 'no'
catalina_base: /usr/share/tomcat
catalina_home: /usr/share/tomcat
Expand Down Expand Up @@ -354,6 +376,7 @@
YAML_DUMP
when 'suse'
<<~YAML_DUMP.chomp
arch: amd64
authbind: 'no'
catalina_base: /usr/share/tomcat
catalina_home: /usr/share/tomcat
Expand Down

0 comments on commit 9b2bab5

Please sign in to comment.