Skip to content

Commit

Permalink
feat(openbsd): add support to work with the default suite
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Mar 24, 2022
1 parent 0f50475 commit 1d97949
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
2 changes: 2 additions & 0 deletions node/osfamilymap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,15 @@ Arch: {}
Alpine: {}

FreeBSD:
rootgroup: wheel
pkg:
name: node
source:
# node-v16.13.0.tar.gz ????
source_hash: 9c00e5b6024cfcbc9105f9c58cf160762e78659a345d100c5bd80a7fb38c684f

OpenBSD:
rootgroup: wheel
pkg:
name: node
source:
Expand Down
11 changes: 10 additions & 1 deletion test/integration/default/controls/config_spec.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# frozen_string_literal: true

# Overide by Platform
root_group =
case platform[:family]
when 'bsd'
'wheel'
else
'root'
end

control 'node configuration' do
title 'should match desired lines'

describe file('/etc/npmrc') do
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_grouped_into root_group }
its('mode') { should cmp '0640' }
its('content') { should include 'prefix = /home/vagrant/.npm-packages' }
end
Expand Down
11 changes: 10 additions & 1 deletion test/integration/default/controls/environ_spec.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# frozen_string_literal: true

# Overide by Platform
root_group =
case platform[:family]
when 'bsd'
'wheel'
else
'root'
end

control 'node configuration environment' do
title 'should match desired lines'

describe file('/etc/default/node.sh') do
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_grouped_into root_group }
its('mode') { should cmp '0640' }
end
end

0 comments on commit 1d97949

Please sign in to comment.