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
5a3f1ba5
Commit
5a3f1ba5
authored
Nov 20, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
3d5ad15d
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
113 additions
and
20 deletions
+113
-20
app/assets/javascripts/error_tracking/components/error_details.vue
...s/javascripts/error_tracking/components/error_details.vue
+7
-3
app/assets/javascripts/error_tracking/details.js
app/assets/javascripts/error_tracking/details.js
+2
-1
app/helpers/projects/error_tracking_helper.rb
app/helpers/projects/error_tracking_helper.rb
+1
-0
app/views/admin/sessions/_new_base.html.haml
app/views/admin/sessions/_new_base.html.haml
+1
-1
changelogs/unreleased/lm-create-new-issue-from-sentry.yml
changelogs/unreleased/lm-create-new-issue-from-sentry.yml
+5
-0
lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
+12
-1
locale/gitlab.pot
locale/gitlab.pot
+3
-0
qa/qa.rb
qa/qa.rb
+1
-0
qa/qa/page/admin/new_session.rb
qa/qa/page/admin/new_session.rb
+22
-0
qa/qa/page/base.rb
qa/qa/page/base.rb
+12
-4
qa/qa/page/main/menu.rb
qa/qa/page/main/menu.rb
+13
-2
qa/qa/resource/settings/hashed_storage.rb
qa/qa/resource/settings/hashed_storage.rb
+1
-1
qa/qa/runtime/api/client.rb
qa/qa/runtime/api/client.rb
+1
-1
qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb
...cs/features/browser_ui/non_devops/performance_bar_spec.rb
+1
-1
qa/qa/support/page/logging.rb
qa/qa/support/page/logging.rb
+14
-2
qa/spec/page/logging_spec.rb
qa/spec/page/logging_spec.rb
+1
-1
spec/frontend/error_tracking/components/error_details_spec.js
.../frontend/error_tracking/components/error_details_spec.js
+11
-1
spec/helpers/projects/error_tracking_helper_spec.rb
spec/helpers/projects/error_tracking_helper_spec.rb
+5
-0
spec/helpers/projects_helper_spec.rb
spec/helpers/projects_helper_spec.rb
+0
-1
No files found.
app/assets/javascripts/error_tracking/components/error_details.vue
View file @
5a3f1ba5
...
@@ -32,6 +32,10 @@ export default {
...
@@ -32,6 +32,10 @@ export default {
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
},
},
issueProjectPath
:
{
type
:
String
,
required
:
true
,
},
},
},
computed
:
{
computed
:
{
...
mapState
(
'
details
'
,
[
'
error
'
,
'
loading
'
,
'
loadingStacktrace
'
,
'
stacktraceData
'
]),
...
mapState
(
'
details
'
,
[
'
error
'
,
'
loading
'
,
'
loadingStacktrace
'
,
'
stacktraceData
'
]),
...
@@ -82,9 +86,9 @@ export default {
...
@@ -82,9 +86,9 @@ export default {
<div
v-else-if=
"showDetails"
class=
"error-details"
>
<div
v-else-if=
"showDetails"
class=
"error-details"
>
<div
class=
"top-area align-items-center justify-content-between py-3"
>
<div
class=
"top-area align-items-center justify-content-between py-3"
>
<span
v-if=
"!loadingStacktrace && stacktrace"
v-html=
"reported"
></span>
<span
v-if=
"!loadingStacktrace && stacktrace"
v-html=
"reported"
></span>
<
!--
<gl-button
class=
"my-3 ml-auto"
variant=
"success
"
>
<
gl-button
variant=
"success"
:href=
"issueProjectPath
"
>
{{
__
(
'
Create I
ssue
'
)
}}
{{
__
(
'
Create i
ssue
'
)
}}
</gl-button>
--
>
</gl-button
>
</div>
</div>
<div>
<div>
<tooltip-on-truncate
:title=
"error.title"
truncate-target=
"child"
placement=
"top"
>
<tooltip-on-truncate
:title=
"error.title"
truncate-target=
"child"
placement=
"top"
>
...
...
app/assets/javascripts/error_tracking/details.js
View file @
5a3f1ba5
...
@@ -12,12 +12,13 @@ export default () => {
...
@@ -12,12 +12,13 @@ export default () => {
store
,
store
,
render
(
createElement
)
{
render
(
createElement
)
{
const
domEl
=
document
.
querySelector
(
this
.
$options
.
el
);
const
domEl
=
document
.
querySelector
(
this
.
$options
.
el
);
const
{
issueDetailsPath
,
issueStackTracePath
}
=
domEl
.
dataset
;
const
{
issueDetailsPath
,
issueStackTracePath
,
issueProjectPath
}
=
domEl
.
dataset
;
return
createElement
(
'
error-details
'
,
{
return
createElement
(
'
error-details
'
,
{
props
:
{
props
:
{
issueDetailsPath
,
issueDetailsPath
,
issueStackTracePath
,
issueStackTracePath
,
issueProjectPath
,
},
},
});
});
},
},
...
...
app/helpers/projects/error_tracking_helper.rb
View file @
5a3f1ba5
...
@@ -18,6 +18,7 @@ module Projects::ErrorTrackingHelper
...
@@ -18,6 +18,7 @@ module Projects::ErrorTrackingHelper
opts
=
[
project
,
issue_id
,
{
format: :json
}]
opts
=
[
project
,
issue_id
,
{
format: :json
}]
{
{
'issue-project-path'
=>
new_project_issue_path
(
project
),
'issue-details-path'
=>
details_project_error_tracking_index_path
(
*
opts
),
'issue-details-path'
=>
details_project_error_tracking_index_path
(
*
opts
),
'issue-stack-trace-path'
=>
stack_trace_project_error_tracking_index_path
(
*
opts
)
'issue-stack-trace-path'
=>
stack_trace_project_error_tracking_index_path
(
*
opts
)
}
}
...
...
app/views/admin/sessions/_new_base.html.haml
View file @
5a3f1ba5
...
@@ -4,4 +4,4 @@
...
@@ -4,4 +4,4 @@
=
password_field_tag
:password
,
nil
,
class:
'form-control'
,
required:
true
,
title:
_
(
'This field is required.'
),
data:
{
qa_selector:
'password_field'
}
=
password_field_tag
:password
,
nil
,
class:
'form-control'
,
required:
true
,
title:
_
(
'This field is required.'
),
data:
{
qa_selector:
'password_field'
}
.submit-container.move-submit-down
.submit-container.move-submit-down
=
submit_tag
_
(
'Enter Admin Mode'
),
class:
'btn btn-success'
,
data:
{
qa_selector:
'
sign_in
_button'
}
=
submit_tag
_
(
'Enter Admin Mode'
),
class:
'btn btn-success'
,
data:
{
qa_selector:
'
enter_admin_mode
_button'
}
changelogs/unreleased/lm-create-new-issue-from-sentry.yml
0 → 100644
View file @
5a3f1ba5
---
title
:
Add ability to create new issue from sentry error detail page
merge_request
:
20337
author
:
type
:
added
lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
View file @
5a3f1ba5
...
@@ -6,9 +6,10 @@
...
@@ -6,9 +6,10 @@
variables
:
variables
:
SAST_ANALYZER_IMAGE_PREFIX
:
"
registry.gitlab.com/gitlab-org/security-products/analyzers"
SAST_ANALYZER_IMAGE_PREFIX
:
"
registry.gitlab.com/gitlab-org/security-products/analyzers"
SAST_DEFAULT_ANALYZERS
:
"
bandit,
brakeman,
gosec,
spotbugs,
flawfinder,
phpcs-security-audit,
security-code-scan,
nodejs-scan,
eslint,
tslint,
secrets,
sobelow,
pmd-apex"
SAST_DEFAULT_ANALYZERS
:
"
bandit,
brakeman,
gosec,
spotbugs,
flawfinder,
phpcs-security-audit,
security-code-scan,
nodejs-scan,
eslint,
tslint,
secrets,
sobelow,
pmd-apex
,
kubesec
"
SAST_ANALYZER_IMAGE_TAG
:
2
SAST_ANALYZER_IMAGE_TAG
:
2
SAST_DISABLE_DIND
:
"
false"
SAST_DISABLE_DIND
:
"
false"
SCAN_KUBERNETES_MANIFESTS
:
"
false"
sast
:
sast
:
stage
:
test
stage
:
test
...
@@ -98,6 +99,16 @@ flawfinder-sast:
...
@@ -98,6 +99,16 @@ flawfinder-sast:
$SAST_DEFAULT_ANALYZERS =~ /flawfinder/ &&
$SAST_DEFAULT_ANALYZERS =~ /flawfinder/ &&
$CI_PROJECT_REPOSITORY_LANGUAGES =~ /\b(c\+\+|c)\b/
$CI_PROJECT_REPOSITORY_LANGUAGES =~ /\b(c\+\+|c)\b/
kubesec-sast
:
extends
:
.analyzer
image
:
name
:
"
$SAST_ANALYZER_IMAGE_PREFIX/kubesec:$SAST_ANALYZER_IMAGE_TAG"
only
:
variables
:
-
$GITLAB_FEATURES =~ /\bsast\b/ &&
$SAST_DEFAULT_ANALYZERS =~ /kubesec/ &&
$SCAN_KUBERNETES_MANIFESTS == 'true'
gosec-sast
:
gosec-sast
:
extends
:
.analyzer
extends
:
.analyzer
image
:
image
:
...
...
locale/gitlab.pot
View file @
5a3f1ba5
...
@@ -4892,6 +4892,9 @@ msgstr ""
...
@@ -4892,6 +4892,9 @@ msgstr ""
msgid "Create group label"
msgid "Create group label"
msgstr ""
msgstr ""
msgid "Create issue"
msgstr ""
msgid "Create lists from labels. Issues with that label appear in that list."
msgid "Create lists from labels. Issues with that label appear in that list."
msgstr ""
msgstr ""
...
...
qa/qa.rb
View file @
5a3f1ba5
...
@@ -331,6 +331,7 @@ module QA
...
@@ -331,6 +331,7 @@ module QA
module
Admin
module
Admin
autoload
:Menu
,
'qa/page/admin/menu'
autoload
:Menu
,
'qa/page/admin/menu'
autoload
:NewSession
,
'qa/page/admin/new_session'
module
Settings
module
Settings
autoload
:Repository
,
'qa/page/admin/settings/repository'
autoload
:Repository
,
'qa/page/admin/settings/repository'
...
...
qa/qa/page/admin/new_session.rb
0 → 100644
View file @
5a3f1ba5
# frozen_string_literal: true
module
QA
module
Page
module
Admin
class
NewSession
<
Page
::
Base
view
'app/views/admin/sessions/_new_base.html.haml'
do
element
:enter_admin_mode_button
element
:password_field
end
def
set_password
(
password
)
fill_element
:password_field
,
password
end
def
click_enter_admin_mode
click_element
:enter_admin_mode_button
end
end
end
end
end
qa/qa/page/base.rb
View file @
5a3f1ba5
...
@@ -86,11 +86,19 @@ module QA
...
@@ -86,11 +86,19 @@ module QA
end
end
def
check_element
(
name
)
def
check_element
(
name
)
find_element
(
name
).
set
(
true
)
retry_until
(
sleep_interval:
1
)
do
find_element
(
name
).
set
(
true
)
find_element
(
name
).
checked?
end
end
end
def
uncheck_element
(
name
)
def
uncheck_element
(
name
)
find_element
(
name
).
set
(
false
)
retry_until
(
sleep_interval:
1
)
do
find_element
(
name
).
set
(
false
)
!
find_element
(
name
).
checked?
end
end
end
# replace with (..., page = self.class)
# replace with (..., page = self.class)
...
@@ -125,8 +133,8 @@ module QA
...
@@ -125,8 +133,8 @@ module QA
has_no_css?
(
element_selector_css
(
name
,
kwargs
),
wait:
wait
,
text:
text
)
has_no_css?
(
element_selector_css
(
name
,
kwargs
),
wait:
wait
,
text:
text
)
end
end
def
has_text?
(
text
)
def
has_text?
(
text
,
wait:
Capybara
.
default_max_wait_time
)
page
.
has_text?
text
page
.
has_text?
(
text
,
wait:
wait
)
end
end
def
has_no_text?
(
text
)
def
has_no_text?
(
text
)
...
...
qa/qa/page/main/menu.rb
View file @
5a3f1ba5
...
@@ -60,8 +60,15 @@ module QA
...
@@ -60,8 +60,15 @@ module QA
end
end
end
end
def
click_admin_area
def
go_to_admin_area
within_top_menu
{
click_element
:admin_area_link
}
click_admin_area
if
has_text?
(
'Enter Admin Mode'
,
wait:
1.0
)
Admin
::
NewSession
.
perform
do
|
new_session
|
new_session
.
set_password
(
Runtime
::
User
.
admin_password
)
new_session
.
click_enter_admin_mode
end
end
end
end
def
signed_in?
def
signed_in?
...
@@ -125,6 +132,10 @@ module QA
...
@@ -125,6 +132,10 @@ module QA
end
end
end
end
end
end
def
click_admin_area
within_top_menu
{
click_element
:admin_area_link
}
end
end
end
end
end
end
end
...
...
qa/qa/resource/settings/hashed_storage.rb
View file @
5a3f1ba5
...
@@ -8,7 +8,7 @@ module QA
...
@@ -8,7 +8,7 @@ module QA
raise
ArgumentError
unless
traits
.
include?
(
:enabled
)
raise
ArgumentError
unless
traits
.
include?
(
:enabled
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
Page
::
Main
::
Menu
.
perform
(
&
:
click
_admin_area
)
Page
::
Main
::
Menu
.
perform
(
&
:
go_to
_admin_area
)
Page
::
Admin
::
Menu
.
perform
(
&
:go_to_repository_settings
)
Page
::
Admin
::
Menu
.
perform
(
&
:go_to_repository_settings
)
Page
::
Admin
::
Settings
::
Repository
.
perform
do
|
setting
|
Page
::
Admin
::
Settings
::
Repository
.
perform
do
|
setting
|
...
...
qa/qa/runtime/api/client.rb
View file @
5a3f1ba5
...
@@ -32,7 +32,7 @@ module QA
...
@@ -32,7 +32,7 @@ module QA
Runtime
::
Browser
.
visit
(
@address
,
Page
::
Main
::
Login
)
Runtime
::
Browser
.
visit
(
@address
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_admin_credentials
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_admin_credentials
)
Page
::
Main
::
Menu
.
perform
(
&
:
click
_admin_area
)
Page
::
Main
::
Menu
.
perform
(
&
:
go_to
_admin_area
)
Page
::
Admin
::
Menu
.
perform
(
&
:go_to_network_settings
)
Page
::
Admin
::
Menu
.
perform
(
&
:go_to_network_settings
)
Page
::
Admin
::
Settings
::
Network
.
perform
do
|
setting
|
Page
::
Admin
::
Settings
::
Network
.
perform
do
|
setting
|
...
...
qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb
View file @
5a3f1ba5
...
@@ -6,7 +6,7 @@ module QA
...
@@ -6,7 +6,7 @@ module QA
before
do
before
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_admin_credentials
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_admin_credentials
)
Page
::
Main
::
Menu
.
perform
(
&
:
click
_admin_area
)
Page
::
Main
::
Menu
.
perform
(
&
:
go_to
_admin_area
)
Page
::
Admin
::
Menu
.
perform
(
&
:go_to_metrics_and_profiling_settings
)
Page
::
Admin
::
Menu
.
perform
(
&
:go_to_metrics_and_profiling_settings
)
Page
::
Admin
::
Settings
::
MetricsAndProfiling
.
perform
do
|
setting
|
Page
::
Admin
::
Settings
::
MetricsAndProfiling
.
perform
do
|
setting
|
...
...
qa/qa/support/page/logging.rb
View file @
5a3f1ba5
...
@@ -59,6 +59,18 @@ module QA
...
@@ -59,6 +59,18 @@ module QA
elements
elements
end
end
def
check_element
(
name
)
log
(
"checking :
#{
name
}
"
)
super
end
def
uncheck_element
(
name
)
log
(
"unchecking :
#{
name
}
"
)
super
end
def
click_element
(
name
,
page
=
nil
,
**
kwargs
)
def
click_element
(
name
,
page
=
nil
,
**
kwargs
)
msg
=
[
"clicking :
#{
name
}
"
]
msg
=
[
"clicking :
#{
name
}
"
]
msg
<<
", expecting to be at
#{
page
.
class
}
"
if
page
msg
<<
", expecting to be at
#{
page
.
class
}
"
if
page
...
@@ -99,10 +111,10 @@ module QA
...
@@ -99,10 +111,10 @@ module QA
found
found
end
end
def
has_text?
(
text
)
def
has_text?
(
text
,
**
kwargs
)
found
=
super
found
=
super
log
(
%Q{has_text?('
#{
text
}
') returned
#{
found
}
}
)
log
(
%Q{has_text?('
#{
text
}
'
, wait:
#{
kwargs
[
:wait
]
||
Capybara
.
default_max_wait_time
}
) returned
#{
found
}
}
)
found
found
end
end
...
...
qa/spec/page/logging_spec.rb
View file @
5a3f1ba5
...
@@ -117,7 +117,7 @@ describe QA::Support::Page::Logging do
...
@@ -117,7 +117,7 @@ describe QA::Support::Page::Logging do
allow
(
page
).
to
receive
(
:has_text?
).
and_return
(
true
)
allow
(
page
).
to
receive
(
:has_text?
).
and_return
(
true
)
expect
{
subject
.
has_text?
'foo'
}
expect
{
subject
.
has_text?
'foo'
}
.
to
output
(
/has_text\?\('foo'\) returned true/
).
to_stdout_from_any_process
.
to
output
(
/has_text\?\('foo'
, wait:
#{
QA
::
Runtime
::
Browser
::
CAPYBARA_MAX_WAIT_TIME
}
\) returned true/
).
to_stdout_from_any_process
end
end
it
'logs has_no_text?'
do
it
'logs has_no_text?'
do
...
...
spec/frontend/error_tracking/components/error_details_spec.js
View file @
5a3f1ba5
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
{
GlLoadingIcon
,
GlLink
}
from
'
@gitlab/ui
'
;
import
{
Gl
Button
,
Gl
LoadingIcon
,
GlLink
}
from
'
@gitlab/ui
'
;
import
Stacktrace
from
'
~/error_tracking/components/stacktrace.vue
'
;
import
Stacktrace
from
'
~/error_tracking/components/stacktrace.vue
'
;
import
ErrorDetails
from
'
~/error_tracking/components/error_details.vue
'
;
import
ErrorDetails
from
'
~/error_tracking/components/error_details.vue
'
;
...
@@ -20,6 +20,7 @@ describe('ErrorDetails', () => {
...
@@ -20,6 +20,7 @@ describe('ErrorDetails', () => {
propsData
:
{
propsData
:
{
issueDetailsPath
:
'
/123/details
'
,
issueDetailsPath
:
'
/123/details
'
,
issueStackTracePath
:
'
/stacktrace
'
,
issueStackTracePath
:
'
/stacktrace
'
,
issueProjectPath
:
'
/test-project/issues/new
'
,
},
},
});
});
}
}
...
@@ -82,6 +83,15 @@ describe('ErrorDetails', () => {
...
@@ -82,6 +83,15 @@ describe('ErrorDetails', () => {
expect
(
wrapper
.
find
(
Stacktrace
).
exists
()).
toBe
(
false
);
expect
(
wrapper
.
find
(
Stacktrace
).
exists
()).
toBe
(
false
);
});
});
it
(
'
should allow a blank issue to be created
'
,
()
=>
{
store
.
state
.
details
.
loading
=
false
;
store
.
state
.
details
.
error
.
id
=
1
;
mountComponent
();
const
button
=
wrapper
.
find
(
GlButton
);
expect
(
button
.
exists
()).
toBe
(
true
);
expect
(
button
.
attributes
().
href
).
toBe
(
wrapper
.
props
().
issueProjectPath
);
});
describe
(
'
Stacktrace
'
,
()
=>
{
describe
(
'
Stacktrace
'
,
()
=>
{
it
(
'
should show stacktrace
'
,
()
=>
{
it
(
'
should show stacktrace
'
,
()
=>
{
store
.
state
.
details
.
loading
=
false
;
store
.
state
.
details
.
loading
=
false
;
...
...
spec/helpers/projects/error_tracking_helper_spec.rb
View file @
5a3f1ba5
...
@@ -81,6 +81,7 @@ describe Projects::ErrorTrackingHelper do
...
@@ -81,6 +81,7 @@ describe Projects::ErrorTrackingHelper do
let
(
:route_params
)
{
[
project
.
owner
,
project
,
issue_id
,
{
format: :json
}]
}
let
(
:route_params
)
{
[
project
.
owner
,
project
,
issue_id
,
{
format: :json
}]
}
let
(
:details_path
)
{
details_namespace_project_error_tracking_index_path
(
*
route_params
)
}
let
(
:details_path
)
{
details_namespace_project_error_tracking_index_path
(
*
route_params
)
}
let
(
:stack_trace_path
)
{
stack_trace_namespace_project_error_tracking_index_path
(
*
route_params
)
}
let
(
:stack_trace_path
)
{
stack_trace_namespace_project_error_tracking_index_path
(
*
route_params
)
}
let
(
:issue_project_path
)
{
new_project_issue_path
(
project
)
}
let
(
:result
)
{
helper
.
error_details_data
(
project
,
issue_id
)
}
let
(
:result
)
{
helper
.
error_details_data
(
project
,
issue_id
)
}
...
@@ -91,5 +92,9 @@ describe Projects::ErrorTrackingHelper do
...
@@ -91,5 +92,9 @@ describe Projects::ErrorTrackingHelper do
it
'returns the correct stack trace path'
do
it
'returns the correct stack trace path'
do
expect
(
result
[
'issue-stack-trace-path'
]).
to
eq
stack_trace_path
expect
(
result
[
'issue-stack-trace-path'
]).
to
eq
stack_trace_path
end
end
it
'returns the correct path for creating a new issue'
do
expect
(
result
[
'issue-project-path'
]).
to
eq
issue_project_path
end
end
end
end
end
spec/helpers/projects_helper_spec.rb
View file @
5a3f1ba5
...
@@ -506,7 +506,6 @@ describe ProjectsHelper do
...
@@ -506,7 +506,6 @@ describe ProjectsHelper do
it
'returns the command to push to create project over SSH'
do
it
'returns the command to push to create project over SSH'
do
allow
(
Gitlab
::
CurrentSettings
.
current_application_settings
).
to
receive
(
:enabled_git_access_protocol
)
{
'ssh'
}
allow
(
Gitlab
::
CurrentSettings
.
current_application_settings
).
to
receive
(
:enabled_git_access_protocol
)
{
'ssh'
}
allow
(
Gitlab
.
config
.
gitlab_shell
).
to
receive
(
:ssh_path_prefix
).
and_return
(
'git@localhost:'
)
expect
(
helper
.
push_to_create_project_command
(
user
)).
to
eq
(
"git push --set-upstream
#{
Gitlab
.
config
.
gitlab
.
user
}
@localhost:john/$(git rev-parse --show-toplevel | xargs basename).git $(git rev-parse --abbrev-ref HEAD)"
)
expect
(
helper
.
push_to_create_project_command
(
user
)).
to
eq
(
"git push --set-upstream
#{
Gitlab
.
config
.
gitlab
.
user
}
@localhost:john/$(git rev-parse --show-toplevel | xargs basename).git $(git rev-parse --abbrev-ref HEAD)"
)
end
end
...
...
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