summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-07-07 12:16:41 -0600
committermo khan <mo.khan@gmail.com>2020-07-07 12:16:41 -0600
commite9580d91d696577df27718a2f5367b84568f82de (patch)
tree9249ef6f652f7a98f7047308d03268db0ed89b41 /spec
parent31adddadee3b56d94356d178cc436fdc5dd7455c (diff)
Scan project from project directly to match gitlab-runner runtime behaviour
Diffstat (limited to 'spec')
-rw-r--r--spec/support/integration_test_helper.rb11
1 files changed, 7 insertions, 4 deletions
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)