Skip to content

Commit d624dcc

Browse files
author
Kevin Paulisse
committed
Add test for absolute path to bootstrap script
1 parent 670e1b3 commit d624dcc

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

spec/octocatalog-diff/tests/catalog-util/bootstrap_spec.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,22 @@
145145
expect(File.file?(File.join(@dir, 'bootstrap_result.yaml'))).to eq(true)
146146
expect(File.file?(File.join(@dir2, 'bootstrap_result.yaml'))).to eq(true)
147147
end
148+
149+
it 'should run a bootstrap script specified as an absolute path' do
150+
logger, _logger_str = OctocatalogDiff::Spec.setup_logger
151+
opts = {
152+
bootstrapped_to_dir: @dir,
153+
bootstrapped_from_dir: @dir2,
154+
to_env: 'test-branch',
155+
from_env: 'master',
156+
basedir: File.join(@repo_dir, 'git-repo'),
157+
parallel: false,
158+
bootstrap_script: File.join(@repo_dir, 'git-repo', 'script', 'bootstrap.sh')
159+
}
160+
OctocatalogDiff::CatalogUtil::Bootstrap.bootstrap_directory_parallelizer(opts, logger)
161+
expect(File.file?(File.join(@dir, 'bootstrap_result.yaml'))).to eq(true)
162+
expect(File.file?(File.join(@dir2, 'bootstrap_result.yaml'))).to eq(true)
163+
end
148164
end
149165
end
150166
end

0 commit comments

Comments
 (0)