summaryrefslogtreecommitdiff
path: root/spec/integration/go/modules_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration/go/modules_spec.rb')
-rw-r--r--spec/integration/go/modules_spec.rb19
1 files changed, 18 insertions, 1 deletions
diff --git a/spec/integration/go/modules_spec.rb b/spec/integration/go/modules_spec.rb
index fa2313c..3edef74 100644
--- a/spec/integration/go/modules_spec.rb
+++ b/spec/integration/go/modules_spec.rb
@@ -1,9 +1,11 @@
+# frozen_string_literal: true
+
require 'spec_helper'
RSpec.describe "modules" do
before do
# Delete go module cache
- system('rm -fr ~/.local/pkg')
+ system('rm -fr /opt/gitlab/.local/pkg')
system('rm -fr /opt/asdf/installs/golang/**/packages/pkg/')
end
@@ -64,6 +66,21 @@ RSpec.describe "modules" do
end
end
+ context "when scanning the `gitlab-runner` project" do
+ subject { runner.scan }
+
+ before do
+ runner.clone('https://gitlab.com/gitlab-org/gitlab-runner.git')
+ end
+
+ specify do
+ expect(subject).to match_schema
+ expect(subject[:licenses]).not_to be_empty
+ expect(subject[:dependencies]).not_to be_empty
+ expect(subject.dependency_names).to include('gitlab.com/gitlab-org/gitlab-terminal')
+ end
+ end
+
context "when scanning a project with vendored modules" do
subject { runner.scan }