Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b8a95c69
Commit
b8a95c69
authored
Oct 10, 2019
by
Tetiana Chupryna
Committed by
Bob Van Landuyt
Oct 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename license report factory
License Management -> License Scanning
parent
207c7aa3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
12 deletions
+12
-12
ee/spec/factories/ci/reports/license_scanning/report.rb
ee/spec/factories/ci/reports/license_scanning/report.rb
+1
-1
ee/spec/lib/gitlab/ci/reports/dependency_list/report_spec.rb
ee/spec/lib/gitlab/ci/reports/dependency_list/report_spec.rb
+1
-1
ee/spec/lib/gitlab/ci/reports/license_scanning/report_spec.rb
...pec/lib/gitlab/ci/reports/license_scanning/report_spec.rb
+5
-5
ee/spec/lib/gitlab/ci/reports/license_scanning/reports_comparer_spec.rb
...tlab/ci/reports/license_scanning/reports_comparer_spec.rb
+2
-2
ee/spec/serializers/license_entity_spec.rb
ee/spec/serializers/license_entity_spec.rb
+1
-1
ee/spec/serializers/licenses_list_entity_spec.rb
ee/spec/serializers/licenses_list_entity_spec.rb
+1
-1
ee/spec/serializers/licenses_list_serializer_spec.rb
ee/spec/serializers/licenses_list_serializer_spec.rb
+1
-1
No files found.
ee/spec/factories/ci/reports/license_
management
/report.rb
→
ee/spec/factories/ci/reports/license_
scanning
/report.rb
View file @
b8a95c69
# frozen_string_literal: true
FactoryBot
.
define
do
factory
:ci_reports_license_
management
_report
,
class:
::
Gitlab
::
Ci
::
Reports
::
LicenseScanning
::
Report
do
factory
:ci_reports_license_
scanning
_report
,
class:
::
Gitlab
::
Ci
::
Reports
::
LicenseScanning
::
Report
do
trait
:report_1
do
after
(
:build
)
do
|
report
,
evaluator
|
report
.
add_dependency
(
'MIT'
,
1
,
'https://opensource.org/licenses/mit'
,
'Library1'
)
...
...
ee/spec/lib/gitlab/ci/reports/dependency_list/report_spec.rb
View file @
b8a95c69
...
...
@@ -20,7 +20,7 @@ describe Gitlab::Ci::Reports::DependencyList::Report do
describe
'#apply_license'
do
subject
{
report
.
dependencies
.
last
[
:licenses
].
size
}
let
(
:license
)
{
build
(
:ci_reports_license_
management
_report
,
:mit
).
licenses
.
first
}
let
(
:license
)
{
build
(
:ci_reports_license_
scanning
_report
,
:mit
).
licenses
.
first
}
before
do
license
.
add_dependency
(
name_of_dependency_with_license
)
...
...
ee/spec/lib/gitlab/ci/reports/license_scanning/report_spec.rb
View file @
b8a95c69
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
describe
Gitlab
::
Ci
::
Reports
::
LicenseScanning
::
Report
do
subject
{
build
(
:ci_reports_license_
management
_report
,
:mit
)
}
subject
{
build
(
:ci_reports_license_
scanning
_report
,
:mit
)
}
describe
'#violates?'
do
let
(
:project
)
{
create
(
:project
)
}
...
...
@@ -43,8 +43,8 @@ describe Gitlab::Ci::Reports::LicenseScanning::Report do
end
describe
"#diff_with"
do
let
(
:report_1
)
{
build
(
:ci_reports_license_
management
_report
,
:report_1
)
}
let
(
:report_2
)
{
build
(
:ci_reports_license_
management
_report
,
:report_2
)
}
let
(
:report_1
)
{
build
(
:ci_reports_license_
scanning
_report
,
:report_1
)
}
let
(
:report_2
)
{
build
(
:ci_reports_license_
scanning
_report
,
:report_2
)
}
subject
{
report_1
.
diff_with
(
report_2
)
}
before
do
...
...
@@ -62,8 +62,8 @@ describe Gitlab::Ci::Reports::LicenseScanning::Report do
end
describe
"#empty?"
do
let
(
:completed_report
)
{
build
(
:ci_reports_license_
management
_report
,
:report_1
)
}
let
(
:empty_report
)
{
build
(
:ci_reports_license_
management
_report
)
}
let
(
:completed_report
)
{
build
(
:ci_reports_license_
scanning
_report
,
:report_1
)
}
let
(
:empty_report
)
{
build
(
:ci_reports_license_
scanning
_report
)
}
it
{
expect
(
empty_report
).
to
be_empty
}
it
{
expect
(
completed_report
).
not_to
be_empty
}
...
...
ee/spec/lib/gitlab/ci/reports/license_scanning/reports_comparer_spec.rb
View file @
b8a95c69
...
...
@@ -3,8 +3,8 @@
require
'spec_helper'
describe
Gitlab
::
Ci
::
Reports
::
LicenseScanning
::
ReportsComparer
do
let
(
:report_1
)
{
build
:ci_reports_license_
management
_report
,
:report_1
}
let
(
:report_2
)
{
build
:ci_reports_license_
management
_report
,
:report_2
}
let
(
:report_1
)
{
build
:ci_reports_license_
scanning
_report
,
:report_1
}
let
(
:report_2
)
{
build
:ci_reports_license_
scanning
_report
,
:report_2
}
let
(
:report_comparer
)
{
described_class
.
new
(
report_1
,
report_2
)
}
before
do
...
...
ee/spec/serializers/license_entity_spec.rb
View file @
b8a95c69
...
...
@@ -6,7 +6,7 @@ describe LicenseEntity do
describe
'#as_json'
do
subject
{
described_class
.
represent
(
license
).
as_json
}
let
(
:license
)
{
build
(
:ci_reports_license_
management
_report
,
:mit
).
licenses
.
first
}
let
(
:license
)
{
build
(
:ci_reports_license_
scanning
_report
,
:mit
).
licenses
.
first
}
let
(
:assert_license
)
do
{
...
...
ee/spec/serializers/licenses_list_entity_spec.rb
View file @
b8a95c69
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
describe
LicensesListEntity
do
let
(
:report
)
{
build
(
:ci_reports_license_
management
_report
,
:mit
)
}
let
(
:report
)
{
build
(
:ci_reports_license_
scanning
_report
,
:mit
)
}
it_behaves_like
'report list'
do
let
(
:name
)
{
:licenses
}
...
...
ee/spec/serializers/licenses_list_serializer_spec.rb
View file @
b8a95c69
...
...
@@ -13,7 +13,7 @@ describe LicensesListSerializer do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:ci_build
)
{
create
(
:ee_ci_build
,
:success
)
}
let
(
:report
)
{
build
(
:ci_reports_license_
management
_report
,
:mit
)
}
let
(
:report
)
{
build
(
:ci_reports_license_
scanning
_report
,
:mit
)
}
before
do
project
.
add_guest
(
user
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment