summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/docker-test10
-rw-r--r--spec/support/integration_test_helper.rb11
2 files changed, 7 insertions, 14 deletions
diff --git a/bin/docker-test b/bin/docker-test
deleted file mode 100755
index c5b0ba1..0000000
--- a/bin/docker-test
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-set -eu
-
-cd "$(dirname "$0")/.."
-
-export CI_PROJECT_DIR="$1"
-
-mkdir -p pkg/ && gem build --silent -o pkg/license-management-test.gem ./*.gemspec
-./run.sh analyze "$CI_PROJECT_DIR"
diff --git a/spec/support/integration_test_helper.rb b/spec/support/integration_test_helper.rb
index 5c9de94..8d5f8b6 100644
--- a/spec/support/integration_test_helper.rb
+++ b/spec/support/integration_test_helper.rb
@@ -67,12 +67,15 @@ module IntegrationTestHelper
end
def scan(env: {})
- return {} unless execute(env, './bin/docker-test', project_path.to_s)
+ execute(env, 'mkdir -p pkg/ && gem build --silent -o pkg/license-management-test.gem ./*.gemspec')
+ Dir.chdir project_path do
+ return {} unless execute(env, "#{License::Management.root.join('run.sh')} analyze .")
- report_path = project_path.join('gl-license-scanning-report.json')
- return {} unless report_path.exist?
+ report_path = project_path.join('gl-license-scanning-report.json')
+ return {} unless report_path.exist?
- Report.new(report_path.read)
+ Report.new(report_path.read)
+ end
end
def execute(env = {}, *args)