From d624dcc01a5e523eaedd077c639411e2f0df5a09 Mon Sep 17 00:00:00 2001 From: Kevin Paulisse Date: Mon, 19 Dec 2016 20:25:03 -0600 Subject: [PATCH] Add test for absolute path to bootstrap script --- .../tests/catalog-util/bootstrap_spec.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/spec/octocatalog-diff/tests/catalog-util/bootstrap_spec.rb b/spec/octocatalog-diff/tests/catalog-util/bootstrap_spec.rb index b9ec6b6..bb4eb96 100644 --- a/spec/octocatalog-diff/tests/catalog-util/bootstrap_spec.rb +++ b/spec/octocatalog-diff/tests/catalog-util/bootstrap_spec.rb @@ -145,6 +145,22 @@ describe OctocatalogDiff::CatalogUtil::Bootstrap do expect(File.file?(File.join(@dir, 'bootstrap_result.yaml'))).to eq(true) expect(File.file?(File.join(@dir2, 'bootstrap_result.yaml'))).to eq(true) end + + it 'should run a bootstrap script specified as an absolute path' do + logger, _logger_str = OctocatalogDiff::Spec.setup_logger + opts = { + bootstrapped_to_dir: @dir, + bootstrapped_from_dir: @dir2, + to_env: 'test-branch', + from_env: 'master', + basedir: File.join(@repo_dir, 'git-repo'), + parallel: false, + bootstrap_script: File.join(@repo_dir, 'git-repo', 'script', 'bootstrap.sh') + } + OctocatalogDiff::CatalogUtil::Bootstrap.bootstrap_directory_parallelizer(opts, logger) + expect(File.file?(File.join(@dir, 'bootstrap_result.yaml'))).to eq(true) + expect(File.file?(File.join(@dir2, 'bootstrap_result.yaml'))).to eq(true) + end end end end