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
33d4e176
Commit
33d4e176
authored
Oct 30, 2020
by
Dan Davison
Committed by
Mark Lapierre
Oct 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable monkey patching globally for QA tests
Fix all remaining occurrences of monkey patching
parent
3bb8e20d
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
73 additions
and
71 deletions
+73
-71
qa/qa/specs/features/browser_ui/1_manage/login/2fa_recovery_spec.rb
...s/features/browser_ui/1_manage/login/2fa_recovery_spec.rb
+1
-1
qa/qa/specs/features/browser_ui/1_manage/login/log_in_with_2fa_spec.rb
...eatures/browser_ui/1_manage/login/log_in_with_2fa_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/3_create/contribution_analytics_spec.rb
...res/ee/browser_ui/3_create/contribution_analytics_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/3_create/jenkins/jenkins_build_status_spec.rb
.../browser_ui/3_create/jenkins/jenkins_build_status_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/3_create/merge_request/add_batch_comments_in_merge_request_spec.rb
...merge_request/add_batch_comments_in_merge_request_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/3_create/merge_request/approval_rules_spec.rb
.../browser_ui/3_create/merge_request/approval_rules_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/3_create/repository/assign_code_owners_spec.rb
...browser_ui/3_create/repository/assign_code_owners_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/3_create/repository/code_owners_spec.rb
...res/ee/browser_ui/3_create/repository/code_owners_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/3_create/repository/file_locking_spec.rb
...es/ee/browser_ui/3_create/repository/file_locking_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/3_create/repository/merge_with_code_owner_in_root_group_spec.rb
...te/repository/merge_with_code_owner_in_root_group_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/3_create/repository/merge_with_code_owner_in_subgroup_spec.rb
...eate/repository/merge_with_code_owner_in_subgroup_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/3_create/repository/pull_mirroring_over_http_spec.rb
...r_ui/3_create/repository/pull_mirroring_over_http_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/3_create/repository/pull_mirroring_over_ssh_with_key_spec.rb
...reate/repository/pull_mirroring_over_ssh_with_key_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/3_create/repository/push_rules_spec.rb
...ures/ee/browser_ui/3_create/repository/push_rules_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb
..._create/repository/restrict_push_protected_branch_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/3_create/web_ide/web_terminal_spec.rb
...tures/ee/browser_ui/3_create/web_ide/web_terminal_spec.rb
+1
-1
qa/spec/service/docker_run/gitlab_runner_spec.rb
qa/spec/service/docker_run/gitlab_runner_spec.rb
+1
-1
qa/spec/service/docker_run/k3s_spec.rb
qa/spec/service/docker_run/k3s_spec.rb
+1
-1
qa/spec/support/shared_examples/merge_with_code_owner_shared_examples.rb
.../shared_examples/merge_with_code_owner_shared_examples.rb
+1
-1
qa/spec/support/shared_examples/scenario_shared_examples.rb
qa/spec/support/shared_examples/scenario_shared_examples.rb
+54
-52
No files found.
qa/qa/specs/features/browser_ui/1_manage/login/2fa_recovery_spec.rb
View file @
33d4e176
# frozen_string_literal: true
module
QA
context
'Manage'
,
:requires_admin
,
:skip_live_env
do
RSpec
.
describe
'Manage'
,
:requires_admin
,
:skip_live_env
do
describe
'2FA'
do
let
(
:owner_user
)
do
Resource
::
User
.
fabricate_or_use
(
Runtime
::
Env
.
gitlab_qa_2fa_owner_username_1
,
Runtime
::
Env
.
gitlab_qa_2fa_owner_password_1
)
...
...
qa/qa/specs/features/browser_ui/1_manage/login/log_in_with_2fa_spec.rb
View file @
33d4e176
# frozen_string_literal: true
module
QA
context
'Manage'
,
:requires_admin
,
:skip_live_env
do
RSpec
.
describe
'Manage'
,
:requires_admin
,
:skip_live_env
do
describe
'2FA'
do
let
(
:owner_user
)
do
Resource
::
User
.
fabricate_or_use
(
Runtime
::
Env
.
gitlab_qa_2fa_owner_username_1
,
Runtime
::
Env
.
gitlab_qa_2fa_owner_password_1
)
...
...
qa/qa/specs/features/ee/browser_ui/3_create/contribution_analytics_spec.rb
View file @
33d4e176
# frozen_string_literal: true
module
QA
context
'Create'
do
RSpec
.
describe
'Create'
do
describe
'Contribution Analytics'
do
let
(
:group
)
do
Resource
::
Group
.
fabricate_via_api!
do
|
group
|
...
...
qa/qa/specs/features/ee/browser_ui/3_create/jenkins/jenkins_build_status_spec.rb
View file @
33d4e176
...
...
@@ -2,7 +2,7 @@
require
'securerandom'
module
QA
context
'Create'
,
:requires_admin
,
:skip_live_env
,
quarantine:
{
issue:
'https://gitlab.com/gitlab-org/gitlab/-/issues/195179'
,
type: :flaky
}
do
RSpec
.
describe
'Create'
,
:requires_admin
,
:skip_live_env
,
quarantine:
{
issue:
'https://gitlab.com/gitlab-org/gitlab/-/issues/195179'
,
type: :flaky
}
do
describe
'Jenkins integration'
do
let
(
:project_name
)
{
"project_with_jenkins_
#{
SecureRandom
.
hex
(
4
)
}
"
}
...
...
qa/qa/specs/features/ee/browser_ui/3_create/merge_request/add_batch_comments_in_merge_request_spec.rb
View file @
33d4e176
# frozen_string_literal: true
module
QA
context
'Create'
do
RSpec
.
describe
'Create'
do
describe
'batch comments in merge request'
do
let
(
:project
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
...
...
qa/qa/specs/features/ee/browser_ui/3_create/merge_request/approval_rules_spec.rb
View file @
33d4e176
# frozen_string_literal: true
module
QA
context
'Create'
do
RSpec
.
describe
'Create'
do
describe
'Approval rules'
,
quarantine:
{
issue:
'https://gitlab.com/gitlab-org/gitlab/-/issues/225595'
,
type: :investigating
}
do
let
(
:approver1
)
{
Resource
::
User
.
fabricate_or_use
(
Runtime
::
Env
.
gitlab_qa_username_1
,
Runtime
::
Env
.
gitlab_qa_password_1
)
}
let
(
:approver2
)
{
Resource
::
User
.
fabricate_or_use
(
Runtime
::
Env
.
gitlab_qa_username_2
,
Runtime
::
Env
.
gitlab_qa_password_2
)
}
...
...
qa/qa/specs/features/ee/browser_ui/3_create/repository/assign_code_owners_spec.rb
View file @
33d4e176
# frozen_string_literal: true
module
QA
context
'Create'
do
RSpec
.
describe
'Create'
do
describe
'Codeowners'
do
# Create one user to be the assigned approver and another user who will not be an approver
let
(
:approver
)
{
Resource
::
User
.
fabricate_or_use
(
Runtime
::
Env
.
gitlab_qa_username_1
,
Runtime
::
Env
.
gitlab_qa_password_1
)
}
...
...
qa/qa/specs/features/ee/browser_ui/3_create/repository/code_owners_spec.rb
View file @
33d4e176
# frozen_string_literal: true
module
QA
context
'Create'
do
RSpec
.
describe
'Create'
do
describe
'Codeowners'
do
let
(
:files
)
do
[
...
...
qa/qa/specs/features/ee/browser_ui/3_create/repository/file_locking_spec.rb
View file @
33d4e176
# frozen_string_literal: true
module
QA
context
'Create'
do
RSpec
.
describe
'Create'
do
describe
'File Locking'
do
before
do
Flow
::
Login
.
sign_in
...
...
qa/qa/specs/features/ee/browser_ui/3_create/repository/merge_with_code_owner_in_root_group_spec.rb
View file @
33d4e176
# frozen_string_literal: true
module
QA
context
'Create'
do
RSpec
.
describe
'Create'
do
describe
'Codeowners'
do
context
'when the project is in the root group'
,
:requires_admin
do
let
(
:approver
)
do
...
...
qa/qa/specs/features/ee/browser_ui/3_create/repository/merge_with_code_owner_in_subgroup_spec.rb
View file @
33d4e176
# frozen_string_literal: true
module
QA
context
'Create'
do
RSpec
.
describe
'Create'
do
describe
'Codeowners'
do
context
'when the project is in a subgroup'
,
:requires_admin
do
let
(
:approver
)
do
...
...
qa/qa/specs/features/ee/browser_ui/3_create/repository/pull_mirroring_over_http_spec.rb
View file @
33d4e176
# frozen_string_literal: true
module
QA
context
'Create'
do
RSpec
.
describe
'Create'
do
describe
'Pull mirror a repository over HTTP'
do
it
'configures and syncs a (pull) mirrored repository with password auth'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/520'
do
Flow
::
Login
.
sign_in
...
...
qa/qa/specs/features/ee/browser_ui/3_create/repository/pull_mirroring_over_ssh_with_key_spec.rb
View file @
33d4e176
# frozen_string_literal: true
module
QA
context
'Create'
do
RSpec
.
describe
'Create'
do
describe
'Pull mirror a repository over SSH with a private key'
do
let
(
:source
)
do
Resource
::
Repository
::
ProjectPush
.
fabricate!
do
|
project_push
|
...
...
qa/qa/specs/features/ee/browser_ui/3_create/repository/push_rules_spec.rb
View file @
33d4e176
# frozen_string_literal: true
module
QA
context
'Create'
do
RSpec
.
describe
'Create'
do
context
'Push Rules'
do
describe
'using non signed commits'
do
before
(
:context
)
do
...
...
qa/qa/specs/features/ee/browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb
View file @
33d4e176
# frozen_string_literal: true
module
QA
context
'Create'
do
RSpec
.
describe
'Create'
do
describe
'Restricted protected branch push and merge'
do
let
(
:user_developer
)
{
Resource
::
User
.
fabricate_or_use
(
Runtime
::
Env
.
gitlab_qa_username_1
,
Runtime
::
Env
.
gitlab_qa_password_1
)
}
let
(
:user_maintainer
)
{
Resource
::
User
.
fabricate_or_use
(
Runtime
::
Env
.
gitlab_qa_username_2
,
Runtime
::
Env
.
gitlab_qa_password_2
)
}
...
...
qa/qa/specs/features/ee/browser_ui/3_create/web_ide/web_terminal_spec.rb
View file @
33d4e176
...
...
@@ -3,7 +3,7 @@
module
QA
# This test was quarantined because relative URL isn't supported
# See https://gitlab.com/gitlab-org/gitlab/issues/13833
context
'Create'
,
:runner
,
:quarantine
do
RSpec
.
describe
'Create'
,
:runner
,
:quarantine
do
describe
'Web IDE web terminal'
do
before
do
project
=
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
...
...
qa/spec/service/docker_run/gitlab_runner_spec.rb
View file @
33d4e176
# frozen_string_literal: true
module
QA
describe
Service
::
DockerRun
::
GitlabRunner
do
RSpec
.
describe
Service
::
DockerRun
::
GitlabRunner
do
let
(
:runner_name
)
{
'test-runner'
}
let
(
:address
)
{
'gitlab.test'
}
let
(
:token
)
{
'abc123'
}
...
...
qa/spec/service/docker_run/k3s_spec.rb
View file @
33d4e176
# frozen_string_literal: true
module
QA
describe
Service
::
DockerRun
::
K3s
do
RSpec
.
describe
Service
::
DockerRun
::
K3s
do
describe
'#host_name'
do
context
'in CI'
do
let
(
:name
)
{
'k3s-12345'
}
...
...
qa/spec/support/shared_examples/merge_with_code_owner_shared_examples.rb
View file @
33d4e176
# frozen_string_literal: true
module
QA
shared_examples
'code owner merge request'
do
RSpec
.
shared_examples
'code owner merge request'
do
let
(
:branch_name
)
{
'new-branch'
}
it
'is approved and merged'
do
...
...
qa/spec/support/shared_examples/scenario_shared_examples.rb
View file @
33d4e176
# frozen_string_literal: true
shared_examples
'a QA scenario class'
do
let
(
:attributes
)
{
spy
(
'Runtime::Scenario'
)
}
let
(
:runner
)
{
spy
(
'Specs::Runner'
)
}
let
(
:release
)
{
spy
(
'Runtime::Release'
)
}
let
(
:feature
)
{
spy
(
'Runtime::Feature'
)
}
let
(
:args
)
{
{
gitlab_address:
'http://gitlab_address'
}
}
let
(
:named_options
)
{
%w[--address http://gitlab_address]
}
let
(
:tags
)
{
[]
}
let
(
:options
)
{
%w[path1 path2]
}
before
do
stub_const
(
'QA::Specs::Runner'
,
runner
)
stub_const
(
'QA::Runtime::Release'
,
release
)
stub_const
(
'QA::Runtime::Scenario'
,
attributes
)
stub_const
(
'QA::Runtime::Feature'
,
feature
)
allow
(
runner
).
to
receive
(
:perform
).
and_yield
(
runner
)
allow
(
QA
::
Runtime
::
Address
).
to
receive
(
:valid?
).
and_return
(
true
)
end
module
QA
RSpec
.
shared_examples
'a QA scenario class'
do
let
(
:attributes
)
{
spy
(
'Runtime::Scenario'
)
}
let
(
:runner
)
{
spy
(
'Specs::Runner'
)
}
let
(
:release
)
{
spy
(
'Runtime::Release'
)
}
let
(
:feature
)
{
spy
(
'Runtime::Feature'
)
}
let
(
:args
)
{
{
gitlab_address:
'http://gitlab_address'
}
}
let
(
:named_options
)
{
%w[--address http://gitlab_address]
}
let
(
:tags
)
{
[]
}
let
(
:options
)
{
%w[path1 path2]
}
before
do
stub_const
(
'QA::Specs::Runner'
,
runner
)
stub_const
(
'QA::Runtime::Release'
,
release
)
stub_const
(
'QA::Runtime::Scenario'
,
attributes
)
stub_const
(
'QA::Runtime::Feature'
,
feature
)
allow
(
runner
).
to
receive
(
:perform
).
and_yield
(
runner
)
allow
(
QA
::
Runtime
::
Address
).
to
receive
(
:valid?
).
and_return
(
true
)
end
it
'responds to perform'
do
expect
(
subject
).
to
respond_to
(
:perform
)
end
it
'responds to perform'
do
expect
(
subject
).
to
respond_to
(
:perform
)
end
it
'sets an address of the subject'
do
subject
.
perform
(
args
)
it
'sets an address of the subject'
do
subject
.
perform
(
args
)
expect
(
attributes
).
to
have_received
(
:define
).
with
(
:gitlab_address
,
'http://gitlab_address'
).
at_least
(
:once
)
end
expect
(
attributes
).
to
have_received
(
:define
).
with
(
:gitlab_address
,
'http://gitlab_address'
).
at_least
(
:once
)
end
it
'performs before hooks only once'
do
subject
.
perform
(
args
)
it
'performs before hooks only once'
do
subject
.
perform
(
args
)
expect
(
release
).
to
have_received
(
:perform_before_hooks
).
once
end
expect
(
release
).
to
have_received
(
:perform_before_hooks
).
once
end
it
'sets tags on runner'
do
subject
.
perform
(
args
)
it
'sets tags on runner'
do
subject
.
perform
(
args
)
expect
(
runner
).
to
have_received
(
:tags
=
).
with
(
tags
)
end
expect
(
runner
).
to
have_received
(
:tags
=
).
with
(
tags
)
end
context
'specifying RSpec options'
do
it
'sets options on runner'
do
subject
.
perform
(
args
,
*
options
)
context
'specifying RSpec options'
do
it
'sets options on runner'
do
subject
.
perform
(
args
,
*
options
)
expect
(
runner
).
to
have_received
(
:options
=
).
with
(
options
)
expect
(
runner
).
to
have_received
(
:options
=
).
with
(
options
)
end
end
end
context
'with named command-line options'
do
it
'converts options to attributes'
do
described_class
.
launch!
(
named_options
)
context
'with named command-line options'
do
it
'converts options to attributes'
do
described_class
.
launch!
(
named_options
)
args
do
|
k
,
v
|
expect
(
attributes
).
to
have_received
(
:define
).
with
(
k
,
v
)
args
do
|
k
,
v
|
expect
(
attributes
).
to
have_received
(
:define
).
with
(
k
,
v
)
end
end
end
it
'raises an error if the option is invalid'
do
expect
{
described_class
.
launch!
([
'--foo'
])
}.
to
raise_error
(
OptionParser
::
InvalidOption
)
end
it
'raises an error if the option is invalid'
do
expect
{
described_class
.
launch!
([
'--foo'
])
}.
to
raise_error
(
OptionParser
::
InvalidOption
)
end
it
'passes on options after --'
do
expect
(
described_class
).
to
receive
(
:perform
).
with
(
attributes
,
*
%w[--tag quarantine]
)
it
'passes on options after --'
do
expect
(
described_class
).
to
receive
(
:perform
).
with
(
attributes
,
*
%w[--tag quarantine]
)
described_class
.
launch!
(
named_options
.
push
(
*
%w[-- --tag quarantine]
))
described_class
.
launch!
(
named_options
.
push
(
*
%w[-- --tag quarantine]
))
end
end
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