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
cfa07577
Commit
cfa07577
authored
Apr 24, 2019
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Automatically add the :geo metadata to Geo spec files
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
39d01237
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
5 deletions
+11
-5
ee/spec/lib/gitlab/background_migration/prune_orphaned_geo_events_spec.rb
...ab/background_migration/prune_orphaned_geo_events_spec.rb
+1
-1
ee/spec/migrations/add_missing_geo_even_log_indexes_spec.rb
ee/spec/migrations/add_missing_geo_even_log_indexes_spec.rb
+1
-1
ee/spec/migrations/drop_repository_storage_events_for_geo_events_spec.rb
...ons/drop_repository_storage_events_for_geo_events_spec.rb
+1
-1
ee/spec/migrations/remove_system_hook_from_geo_nodes_spec.rb
ee/spec/migrations/remove_system_hook_from_geo_nodes_spec.rb
+1
-1
ee/spec/migrations/schedule_prune_orphaned_geo_events_spec.rb
...pec/migrations/schedule_prune_orphaned_geo_events_spec.rb
+1
-1
ee/spec/spec_helper.rb
ee/spec/spec_helper.rb
+6
-0
No files found.
ee/spec/lib/gitlab/background_migration/prune_orphaned_geo_events_spec.rb
View file @
cfa07577
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
PruneOrphanedGeoEvents
,
:migration
,
:postgresql
,
schema:
20180626125654
do
describe
Gitlab
::
BackgroundMigration
::
PruneOrphanedGeoEvents
,
:migration
,
geo:
false
,
schema:
20180626125654
do
let
(
:event_table_name
)
{
'geo_repository_updated_events'
}
let
(
:event_table_name
)
{
'geo_repository_updated_events'
}
let
(
:geo_event_log
)
{
table
(
:geo_event_log
)
}
let
(
:geo_event_log
)
{
table
(
:geo_event_log
)
}
let
(
:geo_updated_events
)
{
table
(
event_table_name
)
}
let
(
:geo_updated_events
)
{
table
(
event_table_name
)
}
...
...
ee/spec/migrations/add_missing_geo_even_log_indexes_spec.rb
View file @
cfa07577
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
'spec_helper'
require
Rails
.
root
.
join
(
'ee'
,
'db'
,
'migrate'
,
'20181017131623_add_missing_geo_even_log_indexes.rb'
)
require
Rails
.
root
.
join
(
'ee'
,
'db'
,
'migrate'
,
'20181017131623_add_missing_geo_even_log_indexes.rb'
)
describe
AddMissingGeoEvenLogIndexes
,
:migration
do
describe
AddMissingGeoEvenLogIndexes
,
:migration
,
geo:
false
do
let
(
:namespace
)
{
table
(
:namespaces
).
create
(
path:
'ns'
,
name:
'Namespace'
)
}
let
(
:namespace
)
{
table
(
:namespaces
).
create
(
path:
'ns'
,
name:
'Namespace'
)
}
let
(
:project
)
{
table
(
:projects
).
create
(
namespace_id:
namespace
.
id
,
path:
'pj'
)
}
let
(
:project
)
{
table
(
:projects
).
create
(
namespace_id:
namespace
.
id
,
path:
'pj'
)
}
let
(
:geo_event_log
)
{
table
(
:geo_event_log
)
}
let
(
:geo_event_log
)
{
table
(
:geo_event_log
)
}
...
...
ee/spec/migrations/drop_repository_storage_events_for_geo_events_spec.rb
View file @
cfa07577
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
'spec_helper'
require
Rails
.
root
.
join
(
'ee'
,
'db'
,
'post_migrate'
,
'20180417102933_drop_repository_storage_events_for_geo_events.rb'
)
require
Rails
.
root
.
join
(
'ee'
,
'db'
,
'post_migrate'
,
'20180417102933_drop_repository_storage_events_for_geo_events.rb'
)
describe
DropRepositoryStorageEventsForGeoEvents
,
:migration
,
schema:
20180416112831
do
describe
DropRepositoryStorageEventsForGeoEvents
,
:migration
,
geo:
false
,
schema:
20180416112831
do
describe
'#up'
do
describe
'#up'
do
before
do
before
do
schema_migrate_up!
schema_migrate_up!
...
...
ee/spec/migrations/remove_system_hook_from_geo_nodes_spec.rb
View file @
cfa07577
require
'spec_helper'
require
'spec_helper'
require
Rails
.
root
.
join
(
'ee'
,
'db'
,
'post_migrate'
,
'20170811082658_remove_system_hook_from_geo_nodes.rb'
)
require
Rails
.
root
.
join
(
'ee'
,
'db'
,
'post_migrate'
,
'20170811082658_remove_system_hook_from_geo_nodes.rb'
)
describe
RemoveSystemHookFromGeoNodes
,
:migration
do
describe
RemoveSystemHookFromGeoNodes
,
:migration
,
geo:
false
do
let
(
:geo_nodes
)
{
table
(
:geo_nodes
)
}
let
(
:geo_nodes
)
{
table
(
:geo_nodes
)
}
let
(
:web_hooks
)
{
table
(
:web_hooks
)
}
let
(
:web_hooks
)
{
table
(
:web_hooks
)
}
...
...
ee/spec/migrations/schedule_prune_orphaned_geo_events_spec.rb
View file @
cfa07577
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
'spec_helper'
require
Rails
.
root
.
join
(
'ee'
,
'db'
,
'post_migrate'
,
'20180618193715_schedule_prune_orphaned_geo_events.rb'
)
require
Rails
.
root
.
join
(
'ee'
,
'db'
,
'post_migrate'
,
'20180618193715_schedule_prune_orphaned_geo_events.rb'
)
describe
SchedulePruneOrphanedGeoEvents
,
:migration
,
schema:
20180615152524
do
describe
SchedulePruneOrphanedGeoEvents
,
:migration
,
geo:
false
,
schema:
20180615152524
do
describe
'#up'
do
describe
'#up'
do
it
'delegates work to Gitlab::BackgroundMigration::PruneOrphanedGeoEvents'
,
:postgresql
do
it
'delegates work to Gitlab::BackgroundMigration::PruneOrphanedGeoEvents'
,
:postgresql
do
expect
(
BackgroundMigrationWorker
).
to
receive
(
:perform_async
).
with
(
'PruneOrphanedGeoEvents'
)
expect
(
BackgroundMigrationWorker
).
to
receive
(
:perform_async
).
with
(
'PruneOrphanedGeoEvents'
)
...
...
ee/spec/spec_helper.rb
View file @
cfa07577
...
@@ -6,6 +6,12 @@ Dir[Rails.root.join("ee/spec/support/**/*.rb")].each { |f| require f }
...
@@ -6,6 +6,12 @@ Dir[Rails.root.join("ee/spec/support/**/*.rb")].each { |f| require f }
RSpec
.
configure
do
|
config
|
RSpec
.
configure
do
|
config
|
config
.
include
EE
::
LicenseHelpers
config
.
include
EE
::
LicenseHelpers
config
.
define_derived_metadata
(
file_path:
%r{ee/spec/}
)
do
|
metadata
|
location
=
metadata
[
:location
]
metadata
[
:geo
]
=
metadata
.
fetch
(
:geo
,
true
)
if
location
=~
%r{[/_]geo[/_]}
end
config
.
before
(
:all
)
do
config
.
before
(
:all
)
do
License
.
destroy_all
# rubocop: disable DestroyAll
License
.
destroy_all
# rubocop: disable DestroyAll
TestLicense
.
init
TestLicense
.
init
...
...
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