From 741cf1016de0494976319e94df74bb0e23426f65 Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 28 Oct 2020 16:45:45 -0600 Subject: Add test to verify that shelling out to rpm works --- lib/e2e/docker.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/e2e/docker.rb b/lib/e2e/docker.rb index f8347e9..5cc3df8 100644 --- a/lib/e2e/docker.rb +++ b/lib/e2e/docker.rb @@ -19,7 +19,7 @@ class Docker end end - def run(image:, project_path: Pathname.pwd, env: {}, debug: ENV.fetch('DEBUG', 'false') == 'true') + def run(image:, project_path: Pathname.pwd, env: {}, debug: ENV.fetch('DEBUG', 'false') == 'true', command: '/analyzer run') env_options = DEFAULT_ENV.merge(env).map { |(key, value)| "--env #{key}='#{value}'" } Dir.chdir pwd do arguments = [ @@ -29,11 +29,12 @@ class Docker "--network=host", "--volume=#{project_path}:/tmp/app", "--workdir=/tmp/app", - env_options + env_options, + "--entrypoint=/bin/sh" ] - arguments.push(debug ? ["-it", "--entrypoint=''", image, '/bin/sh'] : [image, '/analyzer run']) - command = expand(arguments) - system(command, exception: true) + arguments.push(debug ? ["-it", image] : [image]) + arguments.push("-c '#{command}'") + system(expand(arguments), exception: true) end end -- cgit v1.2.3