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
f8cec9dc
Commit
f8cec9dc
authored
Mar 27, 2020
by
Vitali Tatarintev
Committed by
Stan Hu
Mar 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use :geo_fdw + let in Geo related specs
parent
0f8139f0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
ee/spec/models/geo/fdw/project_spec.rb
ee/spec/models/geo/fdw/project_spec.rb
+3
-3
ee/spec/models/geo/project_registry_spec.rb
ee/spec/models/geo/project_registry_spec.rb
+3
-3
ee/spec/requests/api/geo_nodes_spec.rb
ee/spec/requests/api/geo_nodes_spec.rb
+6
-6
No files found.
ee/spec/models/geo/fdw/project_spec.rb
View file @
f8cec9dc
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Geo
::
Fdw
::
Project
,
:geo
,
type: :model
do
RSpec
.
describe
Geo
::
Fdw
::
Project
,
:geo
_fdw
,
type: :model
do
context
'relationships'
do
it
{
is_expected
.
to
have_many
(
:job_artifacts
).
class_name
(
'Geo::Fdw::Ci::JobArtifact'
)
}
it
{
is_expected
.
to
have_many
(
:lfs_objects_projects
).
class_name
(
'Geo::Fdw::LfsObjectsProject'
)
}
...
...
@@ -11,8 +11,8 @@ RSpec.describe Geo::Fdw::Project, :geo, type: :model do
end
describe
'.search'
do
let
_it_be
(
:test_project
,
refind:
true
)
{
create
(
:project
,
description:
'kitten mittens'
)
}
let
_it_be
(
:project
)
{
described_class
.
find
(
test_project
.
id
)
}
let
(
:test_project
)
{
create
(
:project
,
description:
'kitten mittens'
)
}
let
(
:project
)
{
described_class
.
find
(
test_project
.
id
)
}
it
'returns projects with a matching name'
do
expect
(
described_class
.
search
(
project
.
name
)).
to
eq
([
project
])
...
...
ee/spec/models/geo/project_registry_spec.rb
View file @
f8cec9dc
...
...
@@ -2,12 +2,12 @@
require
'spec_helper'
describe
Geo
::
ProjectRegistry
do
describe
Geo
::
ProjectRegistry
,
:geo_fdw
do
include
::
EE
::
GeoHelpers
using
RSpec
::
Parameterized
::
TableSyntax
let
_it_be
(
:project
,
refind:
true
)
{
create
(
:project
,
description:
'kitten mittens'
)
}
let
_it_be
(
:registry
,
refind:
true
)
{
create
(
:geo_project_registry
,
project_id:
project
.
id
)
}
let
(
:project
)
{
create
(
:project
,
description:
'kitten mittens'
)
}
let
(
:registry
)
{
create
(
:geo_project_registry
,
project_id:
project
.
id
)
}
subject
{
registry
}
...
...
ee/spec/requests/api/geo_nodes_spec.rb
View file @
f8cec9dc
...
...
@@ -2,17 +2,17 @@
require
'spec_helper'
describe
API
::
GeoNodes
,
:request_store
,
:geo
,
:prometheus
,
api:
true
do
describe
API
::
GeoNodes
,
:request_store
,
:geo
_fdw
,
:prometheus
,
api:
true
do
include
ApiHelpers
include
::
EE
::
GeoHelpers
include_context
'custom session'
let
_it_be
(
:admin
,
refind:
true
)
{
create
(
:admin
)
}
let
_it_be
(
:user
,
refind:
true
)
{
create
(
:user
)
}
let
_it_be
(
:primary
,
refind:
true
)
{
create
(
:geo_node
,
:primary
)
}
let
_it_be
(
:secondary
,
refind:
true
)
{
create
(
:geo_node
)
}
let
_it_be
(
:secondary_status
,
refind:
true
)
{
create
(
:geo_node_status
,
:healthy
,
geo_node:
secondary
)
}
let
!
(
:admin
)
{
create
(
:admin
)
}
let
!
(
:user
)
{
create
(
:user
)
}
let
!
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
let
!
(
:secondary
)
{
create
(
:geo_node
)
}
let
!
(
:secondary_status
)
{
create
(
:geo_node_status
,
:healthy
,
geo_node:
secondary
)
}
let
(
:unexisting_node_id
)
{
GeoNode
.
maximum
(
:id
).
to_i
.
succ
}
let
(
:group_to_sync
)
{
create
(
:group
)
}
...
...
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