Skip to content

Commit

Permalink
Merge pull request #373 from voxpupuli/modulesync
Browse files Browse the repository at this point in the history
modulesync 7.0.0
  • Loading branch information
bastelfreak authored Aug 21, 2023
2 parents a9e11b3 + b9990f6 commit 37e1761
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 14 deletions.
11 changes: 7 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,21 @@ simple tests against it after applying the module. You can run this
with:

```sh
BEAKER_setfile=debian11-64 bundle exec rake beaker
BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker
```

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

* ubuntu1804
* ubuntu2004
* debian10
* ubuntu2204
* debian11
* centos7
* centos8
* centos9
* almalinux8
* almalinux9
* fedora36

For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests).

Expand Down
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '6.0.0'
modulesync_config_version: '7.0.0'
3 changes: 1 addition & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
inherit_from: .rubocop_todo.yml

# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

inherit_from: .rubocop_todo.yml
inherit_gem:
voxpupuli-test: rubocop.yml
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 6.0', :require => false
gem 'voxpupuli-test', '~> 7.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 3.0', :require => false
Expand Down
4 changes: 2 additions & 2 deletions lib/puppet/provider/selinux_fcontext/semanage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ def self.prefetch(resources)
def create
# is there really no way to have a provider-global helper function cleanly?
args = ['fcontext', '-a', '-t', @resource[:seltype], '-f', @resource[:file_type]]
args.concat(['-s', @resource[:seluser]]) if @resource[:seluser]
args.push('-s', @resource[:seluser]) if @resource[:seluser]
args.push(@resource[:pathspec])
semanage(*args)
end

def destroy
args = ['fcontext', '-d', '-t', @property_hash[:seltype], '-f', @property_hash[:file_type]]
args.concat(['-s', @property_hash[:seluser]]) if @property_hash[:seluser]
args.push('-s', @property_hash[:seluser]) if @property_hash[:seluser]
args.push(@property_hash[:pathspec])
semanage(*args)
end
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
add_custom_fact name.to_sym, value
end
end
Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f }
4 changes: 2 additions & 2 deletions spec/unit/puppet/provider/selinux_fcontext/semanage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def selinux_file_context_path

it 'finds provider for /foobar' do
p = resources['/foobar_a'].provider
expect(p).not_to eq(nil)
expect(p).not_to be_nil
end

context 'has the correct attributes' do
Expand All @@ -174,7 +174,7 @@ def selinux_file_context_path

it 'finds provider for /var/log' do
p = resources['/var/log_a'].provider
expect(p).not_to eq(nil)
expect(p).not_to be_nil
end

context 'has the correct attributes from the system policy' do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def selinux_file_context_subs_path

it 'finds provider for /foobar' do
p = resources['/foobar'].provider
expect(p).not_to eq(nil)
expect(p).not_to be_nil
end

context 'has the correct target' do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@

it 'matches the provider' do
semanage_provider.prefetch('test_t' => resource, 'tlp_t' => permissive.new(seltype: 'tlp_t', ensure: :present))
expect(resource.provider.exists?).to eq(true)
expect(resource.provider.exists?).to be(true)
end
end

Expand Down

0 comments on commit 37e1761

Please sign in to comment.