Skip to content

Commit ea16ac7

Browse files
committed
skip NodeJS16 on EL9
1 parent 809be69 commit ea16ac7

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

spec/acceptance/class_spec.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
require 'spec_helper_acceptance'
44

5+
def nodesource_unsupported(nodejs_version)
6+
return unless fact('os.family') == 'RedHat'
7+
return 'Only NodeJS 16 is supported on EL7' if nodejs_version != '16' && fact('os.release.major') == '7'
8+
return 'NodeJS 16 is not supported on EL9' if nodejs_version == '16' && fact('os.release.major') == '9'
9+
end
10+
511
describe 'nodejs' do
612
case fact('os.family')
713
when 'RedHat'
@@ -29,7 +35,7 @@
2935
end
3036
end
3137

32-
context "explicitly using version #{nodejs_version} from nodesource", if: %w[RedHat Debian].include?(fact('os.family')), skip: (nodejs_version != '16' && fact('os.family') == 'RedHat' && fact('os.release.major') == '7' ? 'Only NodeJS 16 is supported on EL7' : nil) do
38+
context "explicitly using version #{nodejs_version} from nodesource", if: %w[RedHat Debian].include?(fact('os.family')), skip: nodesource_unsupported(nodejs_version) do
3339
# Only nodejs 16 is supported on EL7 by nodesource
3440

3541
include_examples 'cleanup'

0 commit comments

Comments
 (0)