From 037eec6be842eb886df2b98b35c768adc02734e0 Mon Sep 17 00:00:00 2001 From: david22swan Date: Fri, 25 Oct 2024 13:18:17 +0100 Subject: [PATCH] (CAT-2121) Further update tests --- spec/acceptance/validate_all_spec.rb | 3 ++- spec/acceptance/validate_puppet_spec.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/acceptance/validate_all_spec.rb b/spec/acceptance/validate_all_spec.rb index 247ec5ff9..8dc2982d0 100644 --- a/spec/acceptance/validate_all_spec.rb +++ b/spec/acceptance/validate_all_spec.rb @@ -107,12 +107,13 @@ class pdk_in_gemfile {} end describe command('pdk validate') do - its(:exit_status) { is_expected.to eq(0) } + its(:exit_status) { is_expected.to eq(1) } its(:stderr) { is_expected.to match(/Running all available validators/i) } its(:stderr) { is_expected.to match(/Checking metadata syntax/i) } its(:stderr) { is_expected.to match(/Checking module metadata style/i) } its(:stderr) { is_expected.to match(/Checking Puppet manifest syntax/i) } its(:stderr) { is_expected.to match(/Checking Ruby code style/i) } + its(:stdout) { is_expected.to match(/\(warning\):.*Could not parse for environment production/i) } end end end diff --git a/spec/acceptance/validate_puppet_spec.rb b/spec/acceptance/validate_puppet_spec.rb index 4df2d9f8d..2288eaf7b 100644 --- a/spec/acceptance/validate_puppet_spec.rb +++ b/spec/acceptance/validate_puppet_spec.rb @@ -306,7 +306,7 @@ class foo { describe command('pdk validate puppet --format text:stdout --format junit:report.xml') do its(:exit_status) { is_expected.not_to eq(0) } - its(:stdout) { is_expected.to match(/Syntax error at end of input.*\(#{Regexp.escape(example_pp)}.+\)/i) } + its(:stdout) { is_expected.to match(/Syntax error at end of input/i) } its(:stderr) { is_expected.not_to match(epp_spinner_text) } its(:stderr) { is_expected.to match(syntax_spinner_text) } its(:stderr) { is_expected.to match(lint_spinner_text) }