Skip to content

Commit 5834684

Browse files
committed
update system test and lower ruby version max in ci
1 parent d98d4f0 commit 5834684

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ workflows:
3737
parameters:
3838
ruby-version:
3939
- '3.0'
40-
- '3.4'
40+
- '3.3' # latest supported by Puppet 8

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
matrix:
2020
ruby_version:
2121
- '3.0'
22-
- '3.4'
22+
- '3.3' # latest supported by Puppet 8
2323
runs-on: ubuntu-latest
2424
container: ruby:${{ matrix.ruby_version }}-slim
2525
steps:

spec/system/system_spec.rb

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,20 @@
55

66
describe PuppetCheck do
77
context 'executed as a system from the CLI with arguments and various files to be processed' do
8-
# see regression_check_spec
9-
if ENV['CIRCLECI'] == 'true' || ENV['GITHUB_ACTIONS'] == 'true'
10-
let(:cli) { PuppetCheck::CLI.run(%w[-s --puppet-lint no-hard_tabs-check,no-140chars-check --rubocop Layout/LineLength,Style/Encoding --public keys/public_key.pkcs7.pem --private keys/private_key.pkcs7.pem .]) }
11-
else
12-
let(:cli) { PuppetCheck::CLI.run(%w[-s --puppet-lint no-hard_tabs-check,no-140chars-check --rubocop Layout/LineLength,Style/Encoding --public keys/public_key.pkcs7.pem --private keys/private_key.pkcs7.pem --smoke -n good.example.com --octoconfig spec/octocatalog-diff/octocatalog-diff.cfg.rb .]) }
13-
end
14-
158
it 'outputs diagnostic results correctly after processing all of the files' do
169
Dir.chdir(fixtures_dir)
1710

18-
expect { cli }.not_to raise_exception
11+
# see regression_check_spec
12+
if ci_env
13+
expect(PuppetCheck::CLI.run(%w[-s --puppet-lint no-hard_tabs-check,no-140chars-check --rubocop Layout/LineLength,Style/Encoding --public keys/public_key.pkcs7.pem --private keys/private_key.pkcs7.pem .])).to eql(2)
14+
else
15+
expect(PuppetCheck::CLI.run(%w[-s --puppet-lint no-hard_tabs-check,no-140chars-check --rubocop Layout/LineLength,Style/Encoding --public keys/public_key.pkcs7.pem --private keys/private_key.pkcs7.pem --smoke -n good.example.com --octoconfig spec/octocatalog-diff/octocatalog-diff.cfg.rb .])).to eql(2)
16+
end
1917

2018
expect(PuppetCheck.files[:errors].length).to eql(11)
21-
expect(PuppetCheck.files[:warnings].length).to eql(12)
22-
expect(PuppetCheck.files[:clean].length).to eql(14)
19+
expect(PuppetCheck.files[:warnings].length).to eql(13)
20+
expect(PuppetCheck.files[:clean].length).to eql(13)
2321
expect(PuppetCheck.files[:ignored].length).to eql(3)
24-
25-
expect(cli).to eql(2)
2622
end
2723
end
2824

@@ -64,7 +60,7 @@
6460
# assign settings
6561
settings = { style: true }
6662
# see regression_check_spec
67-
unless ENV['CIRCLECI'] == 'true' || ENV['GITHUB_ACTIONS'] == 'true'
63+
unless ci_env
6864
settings[:smoke] = true
6965
settings[:octonodes] = %w[good.example.com]
7066
settings[:octoconfig] = 'spec/octocatalog-diff/octocatalog-diff.cfg.rb'

0 commit comments

Comments
 (0)