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
211ad124
Commit
211ad124
authored
Sep 18, 2020
by
Philip Cunningham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use generate(:url) instead of FFaker::Internet.uri
Invalid URLs (localhost, etc) were being generated in tests.
parent
f5f1a283
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
12 additions
and
12 deletions
+12
-12
ee/spec/factories/dast_site_tokens.rb
ee/spec/factories/dast_site_tokens.rb
+1
-1
ee/spec/factories/dast_sites.rb
ee/spec/factories/dast_sites.rb
+1
-1
ee/spec/graphql/mutations/dast_site_profiles/create_spec.rb
ee/spec/graphql/mutations/dast_site_profiles/create_spec.rb
+1
-1
ee/spec/graphql/mutations/dast_site_profiles/update_spec.rb
ee/spec/graphql/mutations/dast_site_profiles/update_spec.rb
+1
-1
ee/spec/graphql/mutations/pipelines/run_dast_scan_spec.rb
ee/spec/graphql/mutations/pipelines/run_dast_scan_spec.rb
+1
-1
ee/spec/requests/api/graphql/mutations/dast_site_profiles/create_spec.rb
...s/api/graphql/mutations/dast_site_profiles/create_spec.rb
+1
-1
ee/spec/requests/api/graphql/mutations/dast_site_profiles/update_spec.rb
...s/api/graphql/mutations/dast_site_profiles/update_spec.rb
+1
-1
ee/spec/requests/api/graphql/mutations/pipelines/run_dast_scan_spec.rb
...sts/api/graphql/mutations/pipelines/run_dast_scan_spec.rb
+1
-1
ee/spec/services/ci/run_dast_scan_service_spec.rb
ee/spec/services/ci/run_dast_scan_service_spec.rb
+1
-1
ee/spec/services/dast_site_profiles/create_service_spec.rb
ee/spec/services/dast_site_profiles/create_service_spec.rb
+1
-1
ee/spec/services/dast_site_profiles/update_service_spec.rb
ee/spec/services/dast_site_profiles/update_service_spec.rb
+1
-1
ee/spec/services/dast_sites/find_or_create_service_spec.rb
ee/spec/services/dast_sites/find_or_create_service_spec.rb
+1
-1
No files found.
ee/spec/factories/dast_site_tokens.rb
View file @
211ad124
...
...
@@ -3,7 +3,7 @@
FactoryBot
.
define
do
factory
:dast_site_token
do
token
{
SecureRandom
.
uuid
}
url
{
FFaker
::
Internet
.
uri
(
:https
)
}
url
{
generate
(
:url
)
}
before
(
:create
)
do
|
dast_site_token
|
dast_site_token
.
project
||=
FactoryBot
.
create
(
:project
)
...
...
ee/spec/factories/dast_sites.rb
View file @
211ad124
...
...
@@ -3,6 +3,6 @@
FactoryBot
.
define
do
factory
:dast_site
do
project
url
{
FFaker
::
Internet
.
uri
(
:https
)
}
url
{
generate
(
:url
)
}
end
end
ee/spec/graphql/mutations/dast_site_profiles/create_spec.rb
View file @
211ad124
...
...
@@ -8,7 +8,7 @@ RSpec.describe Mutations::DastSiteProfiles::Create do
let
(
:user
)
{
create
(
:user
)
}
let
(
:full_path
)
{
project
.
full_path
}
let
(
:profile_name
)
{
SecureRandom
.
hex
}
let
(
:target_url
)
{
FFaker
::
Internet
.
uri
(
:https
)
}
let
(
:target_url
)
{
generate
(
:url
)
}
let
(
:dast_site_profile
)
{
DastSiteProfile
.
find_by
(
project:
project
,
name:
profile_name
)
}
subject
(
:mutation
)
{
described_class
.
new
(
object:
nil
,
context:
{
current_user:
user
},
field:
nil
)
}
...
...
ee/spec/graphql/mutations/dast_site_profiles/update_spec.rb
View file @
211ad124
...
...
@@ -10,7 +10,7 @@ RSpec.describe Mutations::DastSiteProfiles::Update do
let!
(
:dast_site_profile
)
{
create
(
:dast_site_profile
,
project:
project
)
}
let
(
:new_profile_name
)
{
SecureRandom
.
hex
}
let
(
:new_target_url
)
{
FFaker
::
Internet
.
uri
(
:https
)
}
let
(
:new_target_url
)
{
generate
(
:url
)
}
subject
(
:mutation
)
{
described_class
.
new
(
object:
nil
,
context:
{
current_user:
user
},
field:
nil
)
}
...
...
ee/spec/graphql/mutations/pipelines/run_dast_scan_spec.rb
View file @
211ad124
...
...
@@ -7,7 +7,7 @@ RSpec.describe Mutations::Pipelines::RunDastScan do
let
(
:project
)
{
create
(
:project
,
:repository
,
group:
group
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project_path
)
{
project
.
full_path
}
let
(
:target_url
)
{
FFaker
::
Internet
.
uri
(
:https
)
}
let
(
:target_url
)
{
generate
(
:url
)
}
let
(
:branch
)
{
project
.
default_branch
}
let
(
:scan_type
)
{
Types
::
DastScanTypeEnum
.
enum
[
:passive
]
}
...
...
ee/spec/requests/api/graphql/mutations/dast_site_profiles/create_spec.rb
View file @
211ad124
...
...
@@ -6,7 +6,7 @@ RSpec.describe 'Creating a DAST Site Profile' do
include
GraphqlHelpers
let
(
:profile_name
)
{
FFaker
::
Company
.
catch_phrase
}
let
(
:target_url
)
{
FFaker
::
Internet
.
uri
(
:https
)
}
let
(
:target_url
)
{
generate
(
:url
)
}
let
(
:dast_site_profile
)
{
DastSiteProfile
.
find_by
(
project:
project
,
name:
profile_name
)
}
let
(
:mutation_name
)
{
:dast_site_profile_create
}
...
...
ee/spec/requests/api/graphql/mutations/dast_site_profiles/update_spec.rb
View file @
211ad124
...
...
@@ -8,7 +8,7 @@ RSpec.describe 'Creating a DAST Site Profile' do
let!
(
:dast_site_profile
)
{
create
(
:dast_site_profile
,
project:
project
)
}
let
(
:new_profile_name
)
{
SecureRandom
.
hex
}
let
(
:new_target_url
)
{
FFaker
::
Internet
.
uri
(
:https
)
}
let
(
:new_target_url
)
{
generate
(
:url
)
}
let
(
:mutation_name
)
{
:dast_site_profile_update
}
let
(
:mutation
)
do
...
...
ee/spec/requests/api/graphql/mutations/pipelines/run_dast_scan_spec.rb
View file @
211ad124
...
...
@@ -8,7 +8,7 @@ RSpec.describe 'Running a DAST Scan' do
let
(
:project
)
{
create
(
:project
,
:repository
,
creator:
current_user
)
}
let
(
:current_user
)
{
create
(
:user
)
}
let
(
:project_path
)
{
project
.
full_path
}
let
(
:target_url
)
{
FFaker
::
Internet
.
uri
(
:https
)
}
let
(
:target_url
)
{
generate
(
:url
)
}
let
(
:branch
)
{
project
.
default_branch
}
let
(
:scan_type
)
{
Types
::
DastScanTypeEnum
.
enum
[
:passive
]
}
...
...
ee/spec/services/ci/run_dast_scan_service_spec.rb
View file @
211ad124
...
...
@@ -6,7 +6,7 @@ RSpec.describe Ci::RunDastScanService do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
creator:
user
)
}
let
(
:branch
)
{
project
.
default_branch
}
let
(
:target_url
)
{
FFaker
::
Internet
.
uri
(
:http
)
}
let
(
:target_url
)
{
generate
(
:url
)
}
before
do
stub_licensed_features
(
security_on_demand_scans:
true
)
...
...
ee/spec/services/dast_site_profiles/create_service_spec.rb
View file @
211ad124
...
...
@@ -6,7 +6,7 @@ RSpec.describe DastSiteProfiles::CreateService do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
creator:
user
)
}
let
(
:name
)
{
FFaker
::
Company
.
catch_phrase
}
let
(
:target_url
)
{
FFaker
::
Internet
.
uri
(
:http
)
}
let
(
:target_url
)
{
generate
(
:url
)
}
before
do
stub_licensed_features
(
security_on_demand_scans:
true
)
...
...
ee/spec/services/dast_site_profiles/update_service_spec.rb
View file @
211ad124
...
...
@@ -8,7 +8,7 @@ RSpec.describe DastSiteProfiles::UpdateService do
let
(
:dast_site_profile
)
{
create
(
:dast_site_profile
)
}
let
(
:new_profile_name
)
{
SecureRandom
.
hex
}
let
(
:new_target_url
)
{
FFaker
::
Internet
.
uri
(
:https
)
}
let
(
:new_target_url
)
{
generate
(
:url
)
}
before
do
stub_licensed_features
(
security_on_demand_scans:
true
)
...
...
ee/spec/services/dast_sites/find_or_create_service_spec.rb
View file @
211ad124
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
DastSites
::
FindOrCreateService
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
creator:
user
)
}
let
(
:url
)
{
FFaker
::
Internet
.
uri
(
:http
)
}
let
(
:url
)
{
generate
(
:url
)
}
before
do
stub_licensed_features
(
security_on_demand_scans:
true
)
...
...
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