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
6ac86fea
Commit
6ac86fea
authored
Jan 14, 2020
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change set to let_it_be in ee/spec/lib
Contributes to a removal of rspec-set gem
parent
c2811c1c
Changes
34
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
80 additions
and
80 deletions
+80
-80
ee/spec/lib/container_registry/event_handler_spec.rb
ee/spec/lib/container_registry/event_handler_spec.rb
+2
-2
ee/spec/lib/ee/api/entities/design_management/design_spec.rb
ee/spec/lib/ee/api/entities/design_management/design_spec.rb
+1
-1
ee/spec/lib/ee/api/helpers/issues_helpers_spec.rb
ee/spec/lib/ee/api/helpers/issues_helpers_spec.rb
+4
-4
ee/spec/lib/ee/event_filter_spec.rb
ee/spec/lib/ee/event_filter_spec.rb
+4
-4
ee/spec/lib/ee/gitlab/ci/pipeline/chain/validate/abilities_spec.rb
...ib/ee/gitlab/ci/pipeline/chain/validate/abilities_spec.rb
+2
-2
ee/spec/lib/ee/gitlab/ci/pipeline/quota/activity_spec.rb
ee/spec/lib/ee/gitlab/ci/pipeline/quota/activity_spec.rb
+3
-3
ee/spec/lib/ee/gitlab/ci/pipeline/quota/job_activity_spec.rb
ee/spec/lib/ee/gitlab/ci/pipeline/quota/job_activity_spec.rb
+4
-4
ee/spec/lib/ee/gitlab/ci/pipeline/quota/size_spec.rb
ee/spec/lib/ee/gitlab/ci/pipeline/quota/size_spec.rb
+4
-4
ee/spec/lib/ee/gitlab/hook_data/issue_builder_spec.rb
ee/spec/lib/ee/gitlab/hook_data/issue_builder_spec.rb
+1
-1
ee/spec/lib/gitlab/alerting/alert_spec.rb
ee/spec/lib/gitlab/alerting/alert_spec.rb
+1
-1
ee/spec/lib/gitlab/checks/diff_check_spec.rb
ee/spec/lib/gitlab/checks/diff_check_spec.rb
+1
-1
ee/spec/lib/gitlab/ci/pipeline/chain/limit/activity_spec.rb
ee/spec/lib/gitlab/ci/pipeline/chain/limit/activity_spec.rb
+3
-3
ee/spec/lib/gitlab/ci/pipeline/chain/limit/job_activity_spec.rb
...c/lib/gitlab/ci/pipeline/chain/limit/job_activity_spec.rb
+3
-3
ee/spec/lib/gitlab/ci/pipeline/chain/limit/size_spec.rb
ee/spec/lib/gitlab/ci/pipeline/chain/limit/size_spec.rb
+3
-3
ee/spec/lib/gitlab/code_owners/loader_spec.rb
ee/spec/lib/gitlab/code_owners/loader_spec.rb
+2
-2
ee/spec/lib/gitlab/custom_file_templates_spec.rb
ee/spec/lib/gitlab/custom_file_templates_spec.rb
+7
-7
ee/spec/lib/gitlab/elastic/group_search_results_spec.rb
ee/spec/lib/gitlab/elastic/group_search_results_spec.rb
+3
-3
ee/spec/lib/gitlab/geo/cron_manager_spec.rb
ee/spec/lib/gitlab/geo/cron_manager_spec.rb
+2
-2
ee/spec/lib/gitlab/geo/git_push_http_spec.rb
ee/spec/lib/gitlab/geo/git_push_http_spec.rb
+2
-1
ee/spec/lib/gitlab/geo/git_push_ssh_proxy_spec.rb
ee/spec/lib/gitlab/geo/git_push_ssh_proxy_spec.rb
+2
-2
ee/spec/lib/gitlab/geo/health_check_spec.rb
ee/spec/lib/gitlab/geo/health_check_spec.rb
+1
-1
ee/spec/lib/gitlab/geo/log_cursor/daemon_spec.rb
ee/spec/lib/gitlab/geo/log_cursor/daemon_spec.rb
+3
-4
ee/spec/lib/gitlab/geo/log_cursor/events/repositories_changed_event_spec.rb
.../geo/log_cursor/events/repositories_changed_event_spec.rb
+1
-1
ee/spec/lib/gitlab/geo/log_cursor/events/repository_updated_event_spec.rb
...ab/geo/log_cursor/events/repository_updated_event_spec.rb
+1
-1
ee/spec/lib/gitlab/geo/replication/base_transfer_spec.rb
ee/spec/lib/gitlab/geo/replication/base_transfer_spec.rb
+2
-2
ee/spec/lib/gitlab/geo/replication/file_downloader_spec.rb
ee/spec/lib/gitlab/geo/replication/file_downloader_spec.rb
+1
-1
ee/spec/lib/gitlab/geo/replication/file_transfer_spec.rb
ee/spec/lib/gitlab/geo/replication/file_transfer_spec.rb
+2
-2
ee/spec/lib/gitlab/geo/replication/job_artifact_transfer_spec.rb
.../lib/gitlab/geo/replication/job_artifact_transfer_spec.rb
+3
-3
ee/spec/lib/gitlab/geo/replication/lfs_transfer_spec.rb
ee/spec/lib/gitlab/geo/replication/lfs_transfer_spec.rb
+3
-3
ee/spec/lib/gitlab/geo_spec.rb
ee/spec/lib/gitlab/geo_spec.rb
+2
-2
ee/spec/lib/gitlab/git_access_design_spec.rb
ee/spec/lib/gitlab/git_access_design_spec.rb
+3
-3
ee/spec/lib/gitlab/git_access_spec.rb
ee/spec/lib/gitlab/git_access_spec.rb
+1
-1
ee/spec/lib/gitlab/gl_repository_spec.rb
ee/spec/lib/gitlab/gl_repository_spec.rb
+1
-1
ee/spec/lib/gitlab/import_export/design_repo_saver_spec.rb
ee/spec/lib/gitlab/import_export/design_repo_saver_spec.rb
+2
-2
No files found.
ee/spec/lib/container_registry/event_handler_spec.rb
View file @
6ac86fea
...
...
@@ -15,8 +15,8 @@ describe ContainerRegistry::EventHandler do
{
'tag'
=>
'latest'
,
'repository'
=>
container_repository
.
path
}
end
set
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:secondary_node
)
{
create
(
:geo_node
)
}
let_it_be
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary_node
)
{
create
(
:geo_node
)
}
before
do
stub_current_geo_node
(
primary_node
)
...
...
ee/spec/lib/ee/api/entities/design_management/design_spec.rb
View file @
6ac86fea
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
describe
EE
::
API
::
Entities
::
DesignManagement
::
Design
do
set
(
:design
)
{
create
(
:design
)
}
let_it_be
(
:design
)
{
create
(
:design
)
}
let
(
:entity
)
{
described_class
.
new
(
design
,
request:
double
)
}
subject
{
entity
.
as_json
}
...
...
ee/spec/lib/ee/api/helpers/issues_helpers_spec.rb
View file @
6ac86fea
...
...
@@ -3,10 +3,10 @@
require
'spec_helper'
describe
API
::
Helpers
::
IssuesHelpers
do
set
(
:group
)
{
create
(
:group
)
}
set
(
:project
)
{
create
(
:project
,
group:
group
)
}
set
(
:user
)
{
create
(
:user
)
}
set
(
:epic
)
{
create
(
:epic
,
group:
group
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:project
)
{
create
(
:project
,
group:
group
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:epic
)
{
create
(
:epic
,
group:
group
)
}
subject
(
:issues_helpers
)
{
Class
.
new
.
include
(
described_class
).
new
}
...
...
ee/spec/lib/ee/event_filter_spec.rb
View file @
6ac86fea
...
...
@@ -4,10 +4,10 @@ require 'spec_helper'
describe
EventFilter
do
describe
'#apply_filter'
do
set
(
:group
)
{
create
(
:group
,
:public
)
}
set
(
:project
)
{
create
(
:project
,
:public
)
}
set
(
:epic_event
)
{
create
(
:event
,
:created
,
group:
group
,
target:
create
(
:epic
,
group:
group
))
}
set
(
:issue_event
)
{
create
(
:event
,
:created
,
project:
project
,
target:
create
(
:issue
,
project:
project
))
}
let_it_be
(
:group
)
{
create
(
:group
,
:public
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:public
)
}
let_it_be
(
:epic_event
)
{
create
(
:event
,
:created
,
group:
group
,
target:
create
(
:epic
,
group:
group
))
}
let_it_be
(
:issue_event
)
{
create
(
:event
,
:created
,
project:
project
,
target:
create
(
:issue
,
project:
project
))
}
let
(
:filtered_events
)
{
described_class
.
new
(
filter
).
apply_filter
(
Event
.
all
)
}
context
'with the "epic" filter'
do
...
...
ee/spec/lib/ee/gitlab/ci/pipeline/chain/validate/abilities_spec.rb
View file @
6ac86fea
...
...
@@ -3,8 +3,8 @@
require
'spec_helper'
describe
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Validate
::
Abilities
do
set
(
:project
)
{
create
(
:project
,
:repository
)
}
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:pipeline
)
do
build_stubbed
(
:ci_pipeline
,
project:
project
)
...
...
ee/spec/lib/ee/gitlab/ci/pipeline/quota/activity_spec.rb
View file @
6ac86fea
...
...
@@ -3,9 +3,9 @@
require
'spec_helper'
describe
EE
::
Gitlab
::
Ci
::
Pipeline
::
Quota
::
Activity
do
set
(
:namespace
)
{
create
(
:namespace
)
}
set
(
:project
)
{
create
(
:project
,
namespace:
namespace
)
}
set
(
:gold_plan
)
{
create
(
:gold_plan
)
}
let_it_be
(
:namespace
)
{
create
(
:namespace
)
}
let_it_be
(
:project
,
reload:
true
)
{
create
(
:project
,
namespace:
namespace
)
}
let_it_be
(
:gold_plan
,
reload:
true
)
{
create
(
:gold_plan
)
}
let
(
:plan_limits
)
{
create
(
:plan_limits
,
plan:
gold_plan
)
}
let!
(
:subscription
)
{
create
(
:gitlab_subscription
,
namespace:
namespace
,
hosted_plan:
gold_plan
)
}
...
...
ee/spec/lib/ee/gitlab/ci/pipeline/quota/job_activity_spec.rb
View file @
6ac86fea
...
...
@@ -3,10 +3,10 @@
require
'spec_helper'
describe
EE
::
Gitlab
::
Ci
::
Pipeline
::
Quota
::
JobActivity
do
let_it_be
(
:namespace
,
refind:
true
)
{
create
(
:namespace
)
}
let_it_be
(
:project
,
re
fin
d:
true
)
{
create
(
:project
,
namespace:
namespace
)
}
set
(
:gold_plan
)
{
create
(
:gold_plan
)
}
set
(
:plan_limits
)
{
create
(
:plan_limits
,
plan:
gold_plan
)
}
let_it_be
(
:namespace
)
{
create
(
:namespace
)
}
let_it_be
(
:project
,
re
loa
d:
true
)
{
create
(
:project
,
namespace:
namespace
)
}
let_it_be
(
:gold_plan
,
reload:
true
)
{
create
(
:gold_plan
)
}
let_it_be
(
:plan_limits
,
reload:
true
)
{
create
(
:plan_limits
,
plan:
gold_plan
)
}
let!
(
:subscription
)
{
create
(
:gitlab_subscription
,
namespace:
namespace
,
hosted_plan:
gold_plan
)
}
subject
{
described_class
.
new
(
namespace
,
project
)
}
...
...
ee/spec/lib/ee/gitlab/ci/pipeline/quota/size_spec.rb
View file @
6ac86fea
...
...
@@ -3,10 +3,10 @@
require
'spec_helper'
describe
EE
::
Gitlab
::
Ci
::
Pipeline
::
Quota
::
Size
do
set
(
:namespace
)
{
create
(
:namespace
)
}
set
(
:gold_plan
)
{
create
(
:gold_plan
)
}
set
(
:project
)
{
create
(
:project
,
:repository
,
namespace:
namespace
)
}
set
(
:plan_limits
)
{
create
(
:plan_limits
,
plan:
gold_plan
)
}
let_it_be
(
:namespace
)
{
create
(
:namespace
)
}
let_it_be
(
:gold_plan
,
reload:
true
)
{
create
(
:gold_plan
)
}
let_it_be
(
:project
,
reload:
true
)
{
create
(
:project
,
:repository
,
namespace:
namespace
)
}
let_it_be
(
:plan_limits
)
{
create
(
:plan_limits
,
plan:
gold_plan
)
}
let!
(
:subscription
)
{
create
(
:gitlab_subscription
,
namespace:
namespace
,
hosted_plan:
gold_plan
)
}
let
(
:pipeline
)
{
build_stubbed
(
:ci_pipeline
,
project:
project
)
}
...
...
ee/spec/lib/ee/gitlab/hook_data/issue_builder_spec.rb
View file @
6ac86fea
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
HookData
::
IssueBuilder
do
set
(
:issue
)
{
create
(
:issue
)
}
let_it_be
(
:issue
)
{
create
(
:issue
)
}
let
(
:builder
)
{
described_class
.
new
(
issue
)
}
describe
'#build'
do
...
...
ee/spec/lib/gitlab/alerting/alert_spec.rb
View file @
6ac86fea
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
describe
Gitlab
::
Alerting
::
Alert
do
set
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:alert
)
{
build
(
:alerting_alert
,
project:
project
,
payload:
payload
)
}
let
(
:payload
)
{
{}
}
...
...
ee/spec/lib/gitlab/checks/diff_check_spec.rb
View file @
6ac86fea
...
...
@@ -9,7 +9,7 @@ describe Gitlab::Checks::DiffCheck do
describe
'#validate!'
do
context
'no push rules active'
do
set
(
:push_rule
)
{
create
(
:push_rule
)
}
let_it_be
(
:push_rule
)
{
create
(
:push_rule
)
}
it
"does not attempt to check commits"
do
expect
(
subject
).
not_to
receive
(
:process_commits
)
...
...
ee/spec/lib/gitlab/ci/pipeline/chain/limit/activity_spec.rb
View file @
6ac86fea
...
...
@@ -3,9 +3,9 @@
require
'spec_helper'
describe
::
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Limit
::
Activity
do
set
(
:namespace
)
{
create
(
:namespace
)
}
set
(
:project
)
{
create
(
:project
,
namespace:
namespace
)
}
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:namespace
)
{
create
(
:namespace
)
}
let_it_be
(
:project
)
{
create
(
:project
,
namespace:
namespace
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:command
)
do
double
(
'command'
,
project:
project
,
current_user:
user
)
...
...
ee/spec/lib/gitlab/ci/pipeline/chain/limit/job_activity_spec.rb
View file @
6ac86fea
...
...
@@ -3,9 +3,9 @@
require
'spec_helper'
describe
::
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Limit
::
JobActivity
do
set
(
:namespace
)
{
create
(
:namespace
)
}
set
(
:project
)
{
create
(
:project
,
namespace:
namespace
)
}
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:namespace
)
{
create
(
:namespace
)
}
let_it_be
(
:project
)
{
create
(
:project
,
namespace:
namespace
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:command
)
do
double
(
'command'
,
project:
project
,
current_user:
user
)
...
...
ee/spec/lib/gitlab/ci/pipeline/chain/limit/size_spec.rb
View file @
6ac86fea
...
...
@@ -3,9 +3,9 @@
require
'spec_helper'
describe
::
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Limit
::
Size
do
set
(
:namespace
)
{
create
(
:namespace
)
}
set
(
:project
)
{
create
(
:project
,
:repository
,
namespace:
namespace
)
}
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:namespace
)
{
create
(
:namespace
)
}
let_it_be
(
:project
,
reload:
true
)
{
create
(
:project
,
:repository
,
namespace:
namespace
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:pipeline
)
{
build
(
:ci_pipeline
,
project:
project
)
}
...
...
ee/spec/lib/gitlab/code_owners/loader_spec.rb
View file @
6ac86fea
...
...
@@ -4,8 +4,8 @@ require 'spec_helper'
describe
Gitlab
::
CodeOwners
::
Loader
do
include
FakeBlobHelpers
set
(
:group
)
{
create
(
:group
)
}
set
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
subject
(
:loader
)
{
described_class
.
new
(
project
,
'with-codeowners'
,
paths
)
}
let
(
:codeowner_content
)
do
...
...
ee/spec/lib/gitlab/custom_file_templates_spec.rb
View file @
6ac86fea
...
...
@@ -5,10 +5,10 @@ require 'spec_helper'
describe
Gitlab
::
CustomFileTemplates
do
using
RSpec
::
Parameterized
::
TableSyntax
set
(
:instance_template_project
)
{
create
(
:project
,
:custom_repo
,
files:
template_files
(
'instance'
))
}
set
(
:group
)
{
create
(
:group
)
}
set
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
set
(
:group_template_project
)
{
create
(
:project
,
:custom_repo
,
namespace:
group
,
files:
template_files
(
'group'
))
}
let_it_be
(
:instance_template_project
)
{
create
(
:project
,
:custom_repo
,
files:
template_files
(
'instance'
))
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
let_it_be
(
:group_template_project
)
{
create
(
:project
,
:custom_repo
,
namespace:
group
,
files:
template_files
(
'group'
))
}
subject
(
:templates
)
{
described_class
.
new
(
template_finder
,
target_project
)
}
...
...
@@ -86,9 +86,9 @@ describe Gitlab::CustomFileTemplates do
end
context
'in a subgroup'
do
set
(
:subgroup
)
{
create
(
:group
,
parent:
group
)
}
set
(
:subproject
)
{
create
(
:project
,
namespace:
subgroup
)
}
set
(
:subgroup_template_project
)
{
create
(
:project
,
:custom_repo
,
namespace:
subgroup
,
files:
template_files
(
'subgroup'
))
}
let_it_be
(
:subgroup
)
{
create
(
:group
,
parent:
group
)
}
let_it_be
(
:subproject
)
{
create
(
:project
,
namespace:
subgroup
)
}
let_it_be
(
:subgroup_template_project
)
{
create
(
:project
,
:custom_repo
,
namespace:
subgroup
,
files:
template_files
(
'subgroup'
))
}
let
(
:target_project
)
{
subproject
}
...
...
ee/spec/lib/gitlab/elastic/group_search_results_spec.rb
View file @
6ac86fea
...
...
@@ -3,9 +3,9 @@
require
'spec_helper'
describe
Gitlab
::
Elastic
::
GroupSearchResults
do
set
(
:user
)
{
create
(
:user
)
}
set
(
:group
)
{
create
(
:group
)
}
set
(
:guest
)
{
create
(
:user
).
tap
{
|
u
|
group
.
add_user
(
u
,
Gitlab
::
Access
::
GUEST
)
}
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:guest
)
{
create
(
:user
).
tap
{
|
u
|
group
.
add_user
(
u
,
Gitlab
::
Access
::
GUEST
)
}
}
before
do
stub_ee_application_setting
(
elasticsearch_search:
true
,
elasticsearch_indexing:
true
)
...
...
ee/spec/lib/gitlab/geo/cron_manager_spec.rb
View file @
6ac86fea
...
...
@@ -12,8 +12,8 @@ describe Gitlab::Geo::CronManager, :geo do
subject
(
:manager
)
{
described_class
.
new
}
describe
'#execute'
do
set
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:secondary
)
{
create
(
:geo_node
)
}
let_it_be
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
def
init_cron_job
(
job_name
,
class_name
)
job
=
Sidekiq
::
Cron
::
Job
.
new
(
...
...
ee/spec/lib/gitlab/geo/git_push_http_spec.rb
View file @
6ac86fea
...
...
@@ -9,7 +9,8 @@ describe Gitlab::Geo::GitPushHttp, :geo, :use_clean_rails_memory_store_caching d
let
(
:gl_repository
)
{
'project-77777'
}
let
(
:cache_key
)
{
"
#{
described_class
::
CACHE_KEY_PREFIX
}
:
#{
gl_id
}
:
#{
gl_repository
}
"
}
set
(
:secondary
)
{
create
(
:geo_node
)
}
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
subject
{
described_class
.
new
(
gl_id
,
gl_repository
)
}
describe
'#cache_referrer_node'
do
...
...
ee/spec/lib/gitlab/geo/git_push_ssh_proxy_spec.rb
View file @
6ac86fea
...
...
@@ -7,8 +7,8 @@ describe Gitlab::Geo::GitPushSSHProxy, :geo do
# TODO This spec doesn't work with a relative_url_root https://gitlab.com/gitlab-org/gitlab/issues/11173
# TODO This spec doesn't work with non-localhost
set
(
:primary_node
)
{
create
(
:geo_node
,
:primary
,
url:
'http://localhost:3001'
)
}
set
(
:secondary_node
)
{
create
(
:geo_node
,
url:
'http://localhost:3002'
)
}
let_it_be
(
:primary_node
)
{
create
(
:geo_node
,
:primary
,
url:
'http://localhost:3001'
)
}
let_it_be
(
:secondary_node
)
{
create
(
:geo_node
,
url:
'http://localhost:3002'
)
}
let
(
:current_node
)
{
nil
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
...
...
ee/spec/lib/gitlab/geo/health_check_spec.rb
View file @
6ac86fea
...
...
@@ -6,7 +6,7 @@ describe Gitlab::Geo::HealthCheck, :geo do
include
::
EE
::
GeoHelpers
using
RSpec
::
Parameterized
::
TableSyntax
set
(
:secondary
)
{
create
(
:geo_node
)
}
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
describe
'#perform_checks'
do
before
do
...
...
ee/spec/lib/gitlab/geo/log_cursor/daemon_spec.rb
View file @
6ac86fea
...
...
@@ -6,9 +6,8 @@ describe Gitlab::Geo::LogCursor::Daemon, :clean_gitlab_redis_shared_state do
include
::
EE
::
GeoHelpers
include
ExclusiveLeaseHelpers
set
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:secondary
)
{
create
(
:geo_node
)
}
let_it_be
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
let
(
:options
)
{
{}
}
subject
(
:daemon
)
{
described_class
.
new
(
options
)
}
...
...
@@ -268,7 +267,7 @@ describe Gitlab::Geo::LogCursor::Daemon, :clean_gitlab_redis_shared_state do
end
describe
'#handle_single_event'
do
set
(
:event_log
)
{
create
(
:geo_event_log
,
:updated_event
)
}
let_it_be
(
:event_log
)
{
create
(
:geo_event_log
,
:updated_event
)
}
it
'skips execution when no event data is found'
do
event_log
=
build
(
:geo_event_log
)
...
...
ee/spec/lib/gitlab/geo/log_cursor/events/repositories_changed_event_spec.rb
View file @
6ac86fea
...
...
@@ -6,7 +6,7 @@ describe Gitlab::Geo::LogCursor::Events::RepositoriesChangedEvent, :clean_gitlab
include
::
EE
::
GeoHelpers
let
(
:logger
)
{
Gitlab
::
Geo
::
LogCursor
::
Logger
.
new
(
described_class
,
Logger
::
INFO
)
}
set
(
:secondary
)
{
create
(
:geo_node
)
}
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
let
(
:repositories_changed_event
)
{
create
(
:geo_repositories_changed_event
,
geo_node:
secondary
)
}
let
(
:event_log
)
{
create
(
:geo_event_log
,
repositories_changed_event:
repositories_changed_event
)
}
let!
(
:event_log_state
)
{
create
(
:geo_event_log_state
,
event_id:
event_log
.
id
-
1
)
}
...
...
ee/spec/lib/gitlab/geo/log_cursor/events/repository_updated_event_spec.rb
View file @
6ac86fea
...
...
@@ -6,7 +6,7 @@ describe Gitlab::Geo::LogCursor::Events::RepositoryUpdatedEvent, :clean_gitlab_r
include
::
EE
::
GeoHelpers
let
(
:logger
)
{
Gitlab
::
Geo
::
LogCursor
::
Logger
.
new
(
described_class
,
Logger
::
INFO
)
}
set
(
:secondary
)
{
create
(
:geo_node
)
}
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:repository_updated_event
)
{
create
(
:geo_repository_updated_event
,
project:
project
)
}
let
(
:event_log
)
{
create
(
:geo_event_log
,
repository_updated_event:
repository_updated_event
)
}
...
...
ee/spec/lib/gitlab/geo/replication/base_transfer_spec.rb
View file @
6ac86fea
...
...
@@ -5,8 +5,8 @@ require 'spec_helper'
describe
Gitlab
::
Geo
::
Replication
::
BaseTransfer
do
include
::
EE
::
GeoHelpers
set
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:secondary_node
)
{
create
(
:geo_node
)
}
let_it_be
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary_node
)
{
create
(
:geo_node
)
}
describe
'#can_transfer?'
do
subject
do
...
...
ee/spec/lib/gitlab/geo/replication/file_downloader_spec.rb
View file @
6ac86fea
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
describe
Gitlab
::
Geo
::
Replication
::
FileDownloader
,
:geo
do
include
EE
::
GeoHelpers
set
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
subject
{
downloader
.
execute
}
...
...
ee/spec/lib/gitlab/geo/replication/file_transfer_spec.rb
View file @
6ac86fea
...
...
@@ -5,8 +5,8 @@ require 'spec_helper'
describe
Gitlab
::
Geo
::
Replication
::
FileTransfer
do
include
::
EE
::
GeoHelpers
set
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:secondary_node
)
{
create
(
:geo_node
)
}
let_it_be
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary_node
)
{
create
(
:geo_node
)
}
let
(
:user
)
{
create
(
:user
,
:with_avatar
)
}
let
(
:upload
)
{
Upload
.
find_by
(
model:
user
,
uploader:
'AvatarUploader'
)
}
...
...
ee/spec/lib/gitlab/geo/replication/job_artifact_transfer_spec.rb
View file @
6ac86fea
...
...
@@ -5,9 +5,9 @@ require 'spec_helper'
describe
Gitlab
::
Geo
::
Replication
::
JobArtifactTransfer
,
:geo
do
include
::
EE
::
GeoHelpers
set
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:secondary_node
)
{
create
(
:geo_node
)
}
set
(
:job_artifact
)
{
create
(
:ci_job_artifact
,
:archive
,
:correct_checksum
)
}
let_it_be
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary_node
)
{
create
(
:geo_node
)
}
let_it_be
(
:job_artifact
)
{
create
(
:ci_job_artifact
,
:archive
,
:correct_checksum
)
}
subject
do
described_class
.
new
(
job_artifact
)
...
...
ee/spec/lib/gitlab/geo/replication/lfs_transfer_spec.rb
View file @
6ac86fea
...
...
@@ -5,9 +5,9 @@ require 'spec_helper'
describe
Gitlab
::
Geo
::
Replication
::
LfsTransfer
do
include
::
EE
::
GeoHelpers
set
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:secondary_node
)
{
create
(
:geo_node
)
}
set
(
:lfs_object
)
{
create
(
:lfs_object
,
:with_file
,
:correct_oid
)
}
let_it_be
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary_node
)
{
create
(
:geo_node
)
}
let_it_be
(
:lfs_object
)
{
create
(
:lfs_object
,
:with_file
,
:correct_oid
)
}
subject
do
described_class
.
new
(
lfs_object
)
...
...
ee/spec/lib/gitlab/geo_spec.rb
View file @
6ac86fea
...
...
@@ -6,8 +6,8 @@ describe Gitlab::Geo, :geo, :request_store do
using
RSpec
::
Parameterized
::
TableSyntax
include
::
EE
::
GeoHelpers
set
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:secondary_node
)
{
create
(
:geo_node
)
}
let_it_be
(
:primary_node
)
{
create
(
:geo_node
,
:primary
)
}
let_it_be
(
:secondary_node
)
{
create
(
:geo_node
)
}
shared_examples
'a Geo cached value'
do
|
method
,
key
|
it
'includes GitLab version and Rails.version in the cache key'
do
...
...
ee/spec/lib/gitlab/git_access_design_spec.rb
View file @
6ac86fea
...
...
@@ -4,8 +4,8 @@ require 'spec_helper'
describe
Gitlab
::
GitAccessDesign
do
include
DesignManagementTestHelpers
set
(
:project
)
{
create
(
:project
)
}
set
(
:user
)
{
project
.
owner
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let
(
:protocol
)
{
'web'
}
let
(
:actor
)
{
user
}
...
...
@@ -25,7 +25,7 @@ describe Gitlab::GitAccessDesign do
end
context
"when the user is not allowed to manage designs"
do
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
it
"raises an error "
do
expect
{
subject
}.
to
raise_error
(
::
Gitlab
::
GitAccess
::
UnauthorizedError
)
...
...
ee/spec/lib/gitlab/git_access_spec.rb
View file @
6ac86fea
...
...
@@ -6,7 +6,7 @@ describe Gitlab::GitAccess do
include
GitHelpers
include
EE
::
GeoHelpers
set
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:actor
)
{
user
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
...
...
ee/spec/lib/gitlab/gl_repository_spec.rb
View file @
6ac86fea
...
...
@@ -3,7 +3,7 @@ require 'spec_helper'
describe
Gitlab
::
GlRepository
do
describe
'.parse'
do
set
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
it
'parses a design gl_repository'
do
expect
(
described_class
.
parse
(
"design-
#{
project
.
id
}
"
)).
to
eq
([
project
,
EE
::
Gitlab
::
GlRepository
::
DESIGN
])
...
...
ee/spec/lib/gitlab/import_export/design_repo_saver_spec.rb
View file @
6ac86fea
...
...
@@ -4,8 +4,8 @@ require 'spec_helper'
describe
Gitlab
::
ImportExport
::
DesignRepoSaver
do
describe
'bundle a design Git repo'
do
set
(
:user
)
{
create
(
:user
)
}
set
(
:design
)
{
create
(
:design
,
:with_file
,
versions_count:
1
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:design
)
{
create
(
:design
,
:with_file
,
versions_count:
1
)
}
let!
(
:project
)
{
create
(
:project
,
:design_repo
)
}
let
(
:export_path
)
{
"
#{
Dir
.
tmpdir
}
/project_tree_saver_spec"
}
let
(
:shared
)
{
project
.
import_export_shared
}
...
...
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