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
62d64f0c
Commit
62d64f0c
authored
Jan 16, 2018
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduced rename replication spec steps to the bare minimum.
parent
717a3e31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
41 deletions
+19
-41
qa/qa/specs/features/ee/geo/rename_replication_spec.rb
qa/qa/specs/features/ee/geo/rename_replication_spec.rb
+19
-41
No files found.
qa/qa/specs/features/ee/geo/rename_replication_spec.rb
View file @
62d64f0c
...
@@ -10,8 +10,8 @@ module QA
...
@@ -10,8 +10,8 @@ module QA
project
.
description
=
'Geo project to be renamed'
project
.
description
=
'Geo project to be renamed'
end
end
geo_project_name
=
Page
::
Project
::
Show
.
act
{
project_name
}
geo_project_name
=
project
.
name
expect
(
geo_project_
name
).
to
include
'geo-before-rename'
expect
(
project
.
name
).
to
include
'geo-before-rename'
Factory
::
Repository
::
Push
.
fabricate!
do
|
push
|
Factory
::
Repository
::
Push
.
fabricate!
do
|
push
|
push
.
project
=
project
push
.
project
=
project
...
@@ -20,53 +20,31 @@ module QA
...
@@ -20,53 +20,31 @@ module QA
push
.
commit_message
=
'Add README.md'
push
.
commit_message
=
'Add README.md'
end
end
# check it exists on the other machine
# rename the project
Runtime
::
Browser
.
visit
(
:geo_secondary
,
QA
::
Page
::
Main
::
Login
)
do
Runtime
::
Browser
.
visit
(
:geo_primary
)
Page
::
Main
::
OAuth
.
act
do
Page
::
Menu
::
Main
.
act
{
go_to_projects
}
authorize!
if
needs_authorization?
end
expect
(
page
).
to
have_content
'You are on a secondary (read-only) Geo node'
Page
::
Menu
::
Main
.
perform
do
|
menu
|
menu
.
go_to_projects
expect
(
page
).
to
have_content
(
geo_project_name
)
end
sleep
10
# wait for repository replication
Page
::
Dashboard
::
Projects
.
perform
do
|
dashboard
|
dashboard
.
go_to_project
(
geo_project_name
)
Page
::
Dashboard
::
Projects
.
perform
do
|
dashboard
|
end
dashboard
.
go_to_project
(
geo_project_name
)
end
Page
::
Project
::
Show
.
perform
do
expect
(
page
).
to
have_content
'README.md'
expect
(
page
).
to
have_content
'This is Geo project!'
end
# rename the project
Page
::
Menu
::
Side
.
act
{
go_to_settings
}
Runtime
::
Browser
.
visit
(
:geo_primary
)
Page
::
Menu
::
Main
.
act
{
go_to_projects
}
Page
::
Dashboard
::
Projects
.
perform
do
|
dashboard
|
geo_project_newname
=
"geo-after-rename-
#{
SecureRandom
.
hex
(
8
)
}
"
dashboard
.
go_to_project
(
geo_project_name
)
Page
::
Project
::
Settings
::
Main
.
perform
do
|
settings
|
settings
.
expand_advanced_settings
do
|
page
|
page
.
rename_to
(
geo_project_newname
)
end
end
end
Page
::
Menu
::
Side
.
act
{
go_to_settings
}
sleep
2
# wait for replication
geo_project_newname
=
"geo-after-rename-
#{
SecureRandom
.
hex
(
8
)
}
"
# check renamed project exist on secondary node
Page
::
Project
::
Settings
::
Main
.
perform
do
|
settings
|
Runtime
::
Browser
.
visit
(
:geo_secondary
,
QA
::
Page
::
Main
::
Login
)
do
settings
.
expand_advanced_settings
do
|
page
|
Page
::
Main
::
OAuth
.
act
do
page
.
rename_to
(
geo_project_newname
)
authorize!
if
needs_authorization?
end
end
end
sleep
2
# wait for replication
# check renamed project exist on secondary node
Runtime
::
Browser
.
visit
(
:geo_secondary
)
expect
(
page
).
to
have_content
'You are on a secondary (read-only) Geo node'
expect
(
page
).
to
have_content
'You are on a secondary (read-only) Geo node'
Page
::
Menu
::
Main
.
perform
do
|
menu
|
Page
::
Menu
::
Main
.
perform
do
|
menu
|
...
...
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