Skip to content

Commit

Permalink
Add support for EL8
Browse files Browse the repository at this point in the history
* Added OEL to the metadata.json
* Added a very basic acceptance test to test the main components of the
  module. This should be expanded into multi-node tests later.
* Added a REFERENCE.md
* Updated the README.md to point to the REFERENCE.md and added
  instructions on how to run the acceptance test.

Closes #246
  • Loading branch information
trevor-vaughan committed Feb 12, 2020
1 parent 8f78335 commit 2a36225
Show file tree
Hide file tree
Showing 21 changed files with 1,166 additions and 110 deletions.
6 changes: 4 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,18 +256,20 @@ Beaker also supports docker containers. We also use that in our automated CI
pipeline at [travis-ci](http://travis-ci.org). To use that instead of Vagrant:

```sh
PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64{hypervisor=docker} BEAKER_destroy=yes bundle exec rake beaker
PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian10-64{hypervisor=docker} BEAKER_destroy=yes bundle exec rake beaker
```

You can replace the string `debian9` with any common operating system.
You can replace the string `debian10` with any common operating system.
The following strings are known to work:

* ubuntu1604
* ubuntu1804
* debian8
* debian9
* debian10
* centos6
* centos7
* centos8

The easiest way to debug in a docker container is to open a shell:

Expand Down
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modulesync_config_version: '2.10.1'
modulesync_config_version: '2.11.0'
7 changes: 2 additions & 5 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require: rubocop-rspec
AllCops:
TargetRubyVersion: 2.1
# Puppet Server 5 defaults to jruby 1.7 so TargetRubyVersion must stay at 1.9 until we drop support for puppet 5
TargetRubyVersion: 1.9
Include:
- ./**/*.rb
Exclude:
Expand All @@ -13,10 +14,6 @@ AllCops:
- Rakefile
- Guardfile
- Vagrantfile

Style/SymbolArray:
Enabled: false

Lint/ConditionPosition:
Enabled: True

Expand Down
8 changes: 8 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ spec/acceptance/nodesets/ec2/windows-2016-base-x64.yml:
spec/acceptance/nodesets/archlinux-2-x64.yml:
delete: true

Gemfile:
optional:
':test':
- gem: 'mocha'
version: '~> 1.10.0'
':system_tests':
- gem: 'beaker-vagrant'

.rubocop.yml:
default_configs:
Style/SymbolArray:
Expand Down
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ group :test do
gem 'redcarpet', :require => false
gem 'rubocop', '~> 0.49.1', :require => false
gem 'rubocop-rspec', '~> 1.15.0', :require => false
gem 'mocha', '~> 1.4.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'parallel_tests', :require => false
gem 'mocha', '~> 1.10.0', :require => false
end

group :development do
Expand Down Expand Up @@ -62,6 +62,8 @@ group :system_tests do
gem 'rbnacl', '>= 4', :require => false
gem 'rbnacl-libsodium', :require => false
gem 'bcrypt_pbkdf', :require => false
gem 'ed25519', :require => false
gem 'beaker-vagrant', :require => false
end

group :release do
Expand Down
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

## Description

This module manages firewalld, the userland interface that replaces iptables and ships with RHEL7. The module manages firewalld itself as well as providing types and providers for managing firewalld zones, ports, and rich rules.
This module manages firewalld, the userland interface that replaces iptables and ships with RHEL7+. The module manages firewalld itself as well as providing types and providers for managing firewalld zones, ports, and rich rules.

## Compatibility

Expand Down Expand Up @@ -531,8 +531,28 @@ firewalld::direct_passthroughs:
* `args`: Name of the passthroughhrough to add (e.g: -A OUTPUT -j OUTPUT_filter)


## Testing

### Unit Testing

Unit tests can be executed by running the following commands:
* `bundle install`
* `bundle exec rake spec`

### Acceptance Testing

Acceptance tests are performed using [Beaker](https://github.com/puppetlabs/beaker) and require [Vagrant](https://vagrantup.com) and [VirtualBox](https://www.virtualbox.org) to run successfully.

It is **HIGHLY RECOMMENDED** that you use the upstream Vagrant package and not one from your OS provider.

To run the acceptance tests:
* `bundle install`
* `bundle exec rake beaker`

To leave the Vagrant hosts running on failure for debugging:
* `BEAKER_destroy=onpass bundle exec rake beaker`
* `cd .vagrant/beaker_vagrant_files/default.yml`
* `vagrant ssh <host>`

# Author

Expand Down
Loading

0 comments on commit 2a36225

Please sign in to comment.