|
5 | 5 |
|
6 | 6 | describe PuppetCheck do |
7 | 7 | 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 | | - |
15 | 8 | it 'outputs diagnostic results correctly after processing all of the files' do |
16 | 9 | Dir.chdir(fixtures_dir) |
17 | 10 |
|
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 |
19 | 17 |
|
20 | 18 | 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) |
23 | 21 | expect(PuppetCheck.files[:ignored].length).to eql(3) |
24 | | - |
25 | | - expect(cli).to eql(2) |
26 | 22 | end |
27 | 23 | end |
28 | 24 |
|
|
64 | 60 | # assign settings |
65 | 61 | settings = { style: true } |
66 | 62 | # see regression_check_spec |
67 | | - unless ENV['CIRCLECI'] == 'true' || ENV['GITHUB_ACTIONS'] == 'true' |
| 63 | + unless ci_env |
68 | 64 | settings[:smoke] = true |
69 | 65 | settings[:octonodes] = %w[good.example.com] |
70 | 66 | settings[:octoconfig] = 'spec/octocatalog-diff/octocatalog-diff.cfg.rb' |
|
0 commit comments