From f80644fb8c14e9b900ec5d5048feefaffb19322c Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Wed, 18 Sep 2024 03:10:07 -0500 Subject: [PATCH] Avoid failures when install_simp_repos is allowed to fail --- .../default/install_simp_deps_repo_spec.rb | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/spec/acceptance/suites/default/install_simp_deps_repo_spec.rb b/spec/acceptance/suites/default/install_simp_deps_repo_spec.rb index 9990d47..dd31380 100644 --- a/spec/acceptance/suites/default/install_simp_deps_repo_spec.rb +++ b/spec/acceptance/suites/default/install_simp_deps_repo_spec.rb @@ -12,7 +12,15 @@ end context 'default settings' do - before(:all) { install_simp_repos(host) } + before(:all) do + install_simp_repos(host) + rescue => e + if expect_failures + warn e.message + else + raise e + end + end it 'enables the correct repos' do skip "#{host} is not supported yet" if expect_failures @@ -34,7 +42,15 @@ end context 'when passed a disabled list ' do - before(:all) { install_simp_repos(host, ['simp-community-simp'] ) } + before(:all) do + install_simp_repos(host, ['simp-community-simp'] ) + rescue => e + if expect_failures + warn e.message + else + raise e + end + end it 'enables the correct repos' do skip "#{host} is not supported yet" if expect_failures