diff --git a/.travis.yml b/.travis.yml index e6890903..8d0c9aef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/.yamllint b/.yamllint index 61c747d3..e80ebacd 100644 --- a/.yamllint +++ b/.yamllint @@ -12,7 +12,7 @@ ignore: | node_modules/ test/**/states/**/*.sls .kitchen/ - tomcat/osmap.yaml + tomcat/osfamilymap.yaml yaml-files: # Default settings diff --git a/test/integration/tomcat_install/controls/packages_spec.rb b/test/integration/tomcat_install/controls/packages_spec.rb index a5190b70..2a93d78e 100644 --- a/test/integration/tomcat_install/controls/packages_spec.rb +++ b/test/integration/tomcat_install/controls/packages_spec.rb @@ -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 diff --git a/test/integration/tomcat_install/controls/services_spec.rb b/test/integration/tomcat_install/controls/services_spec.rb index 088a70e6..32b814de 100644 --- a/test/integration/tomcat_install/controls/services_spec.rb +++ b/test/integration/tomcat_install/controls/services_spec.rb @@ -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 diff --git a/test/integration/tomcat_install/controls/yaml_dump_spec.rb b/test/integration/tomcat_install/controls/yaml_dump_spec.rb index b27838a2..7723adda 100644 --- a/test/integration/tomcat_install/controls/yaml_dump_spec.rb +++ b/test/integration/tomcat_install/controls/yaml_dump_spec.rb @@ -7,7 +7,28 @@ 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 @@ -15,7 +36,7 @@ catalina_tmpdir: /var/cache/tomcat/temp cluster: simple: true - conf_dir: /etc/tomcat8 + conf_dir: #{conf_dir} connectors: example_connector: port: 8443 @@ -72,7 +93,7 @@ global: simpleValue type: java.lang.Integer expires_when: 2 weeks - group: tomcat8 + group: #{group} haveged_enabled: true id: - example.com @@ -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: @@ -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: @@ -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: @@ -175,12 +196,13 @@ pattern: '%h %l %u %t "%m http://%v%U %H" %s %b "%{Referer}i" "%{User-Agent}i" %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 @@ -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