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
835a9aaa
Commit
835a9aaa
authored
Dec 11, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use QA Runtime Browser in EE specific QA scenarios
parent
33e99a21
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
54 deletions
+52
-54
qa/qa/ee/scenario/test/geo.rb
qa/qa/ee/scenario/test/geo.rb
+10
-8
qa/qa/ee/strategy.rb
qa/qa/ee/strategy.rb
+3
-9
qa/qa/specs/features/ee/geo/replication_spec.rb
qa/qa/specs/features/ee/geo/replication_spec.rb
+39
-37
No files found.
qa/qa/ee/scenario/test/geo.rb
View file @
835a9aaa
...
@@ -15,10 +15,6 @@ module QA
...
@@ -15,10 +15,6 @@ module QA
QA
::
Specs
::
Config
.
act
{
configure_capybara!
}
QA
::
Specs
::
Config
.
act
{
configure_capybara!
}
unless
args
[
:geo_skip_setup?
]
unless
args
[
:geo_skip_setup?
]
# TODO, Factory::License -> gitlab-org/gitlab-qa#86
#
QA
::
Runtime
::
Scenario
.
define
(
:gitlab_address
,
args
[
:geo_primary_address
])
Geo
::
Primary
.
act
do
Geo
::
Primary
.
act
do
add_license
add_license
enable_hashed_storage
enable_hashed_storage
...
@@ -49,7 +45,9 @@ module QA
...
@@ -49,7 +45,9 @@ module QA
#
#
puts
'Adding GitLab EE license ...'
puts
'Adding GitLab EE license ...'
Scenario
::
License
::
Add
.
perform
(
ENV
[
'EE_LICENSE'
])
QA
::
Runtime
::
Browser
.
visit
(
:geo_primary
,
QA
::
Page
::
Main
::
Login
)
do
Scenario
::
License
::
Add
.
perform
(
ENV
[
'EE_LICENSE'
])
end
end
end
def
enable_hashed_storage
def
enable_hashed_storage
...
@@ -57,7 +55,9 @@ module QA
...
@@ -57,7 +55,9 @@ module QA
#
#
puts
'Enabling hashed repository storage setting ...'
puts
'Enabling hashed repository storage setting ...'
QA
::
Scenario
::
Gitlab
::
Admin
::
HashedStorage
.
perform
(
:enabled
)
QA
::
Runtime
::
Browser
.
visit
(
:geo_primary
,
QA
::
Page
::
Main
::
Login
)
do
QA
::
Scenario
::
Gitlab
::
Admin
::
HashedStorage
.
perform
(
:enabled
)
end
end
end
def
add_secondary_node
def
add_secondary_node
...
@@ -65,8 +65,10 @@ module QA
...
@@ -65,8 +65,10 @@ module QA
#
#
puts
'Adding new Geo secondary node ...'
puts
'Adding new Geo secondary node ...'
Scenario
::
Geo
::
Node
.
perform
do
|
node
|
QA
::
Runtime
::
Browser
.
visit
(
:geo_primary
,
QA
::
Page
::
Main
::
Login
)
do
node
.
address
=
QA
::
Runtime
::
Scenario
.
geo_secondary_address
Scenario
::
Geo
::
Node
.
perform
do
|
node
|
node
.
address
=
QA
::
Runtime
::
Scenario
.
geo_secondary_address
end
end
end
end
end
...
...
qa/qa/ee/strategy.rb
View file @
835a9aaa
...
@@ -7,18 +7,12 @@ module QA
...
@@ -7,18 +7,12 @@ module QA
require
'qa/ee'
require
'qa/ee'
end
end
##
# TODO generic solution for screenshot in factories
#
# gitlab-org/gitlab-qa#86
#
def
perform_before_hooks
def
perform_before_hooks
return
unless
ENV
[
'EE_LICENSE'
]
return
unless
ENV
[
'EE_LICENSE'
]
EE
::
Scenario
::
License
::
Add
.
perform
(
ENV
[
'EE_LICENSE'
])
QA
::
Runtime
::
Browser
.
visit
(
:gitlab
,
QA
::
Page
::
Main
::
Login
)
do
rescue
EE
::
Scenario
::
License
::
Add
.
perform
(
ENV
[
'EE_LICENSE'
])
Capybara
::
Screenshot
.
screenshot_and_save_page
end
raise
end
end
end
end
end
end
...
...
qa/qa/specs/features/ee/geo/replication_spec.rb
View file @
835a9aaa
module
QA
module
QA
feature
'GitLab Geo replication'
,
:geo
do
feature
'GitLab Geo replication'
,
:geo
do
scenario
'users pushes code to the primary node'
do
scenario
'users pushes code to the primary node'
do
Page
::
Main
::
Entry
.
act
{
visit
(
Runtime
::
Scenario
.
geo_primary_address
)
}
Runtime
::
Browser
.
visit
(
:geo_primary
,
QA
::
Page
::
Main
::
Login
)
do
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
Scenario
::
Gitlab
::
Project
::
Create
.
perform
do
|
scenario
|
Scenario
::
Gitlab
::
Project
::
Create
.
perform
do
|
scenario
|
scenario
.
name
=
'geo-project'
scenario
.
name
=
'geo-project'
scenario
.
description
=
'Geo test project'
scenario
.
description
=
'Geo test project'
end
end
geo_project_name
=
Page
::
Project
::
Show
.
act
{
project_name
}
geo_project_name
=
Page
::
Project
::
Show
.
act
{
project_name
}
expect
(
geo_project_name
).
to
include
'geo-project'
expect
(
geo_project_name
).
to
include
'geo-project'
Git
::
Repository
.
perform
do
|
repository
|
Git
::
Repository
.
perform
do
|
repository
|
repository
.
location
=
Page
::
Project
::
Show
.
act
do
repository
.
location
=
Page
::
Project
::
Show
.
act
do
choose_repository_clone_http
choose_repository_clone_http
repository_location
repository_location
end
end
repository
.
use_default_credentials
repository
.
use_default_credentials
repository
.
act
do
repository
.
act
do
clone
clone
configure_identity
(
'GitLab QA'
,
'root@gitlab.com'
)
configure_identity
(
'GitLab QA'
,
'root@gitlab.com'
)
add_file
(
'README.md'
,
'# This is Geo project!'
)
add_file
(
'README.md'
,
'# This is Geo project!'
)
commit
(
'Add README.md'
)
commit
(
'Add README.md'
)
push_changes
push_changes
end
end
end
end
Page
::
Main
::
Entry
.
act
{
visit
(
Runtime
::
Scenario
.
geo_secondary_address
)
}
Page
::
Main
::
OAuth
.
act
do
Runtime
::
Browser
.
visit
(
:geo_secondary
,
QA
::
Page
::
Main
::
Login
)
do
authorize!
if
needs_authorization?
Page
::
Main
::
OAuth
.
act
do
end
authorize!
if
needs_authorization?
end
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
::
Main
::
Menu
.
perform
do
|
menu
|
Page
::
Main
::
Menu
.
perform
do
|
menu
|
menu
.
go_to_projects
menu
.
go_to_projects
expect
(
page
).
to
have_content
(
geo_project_name
)
expect
(
page
).
to
have_content
(
geo_project_name
)
end
end
sleep
10
# wait for repository replication
sleep
10
# wait for repository replication
Page
::
Dashboard
::
Projects
.
perform
do
|
dashboard
|
Page
::
Dashboard
::
Projects
.
perform
do
|
dashboard
|
dashboard
.
go_to_project
(
geo_project_name
)
dashboard
.
go_to_project
(
geo_project_name
)
end
end
Page
::
Project
::
Show
.
perform
do
Page
::
Project
::
Show
.
perform
do
expect
(
page
).
to
have_content
'README.md'
expect
(
page
).
to
have_content
'README.md'
expect
(
page
).
to
have_content
'This is Geo project!'
expect
(
page
).
to
have_content
'This is Geo project!'
end
end
end
end
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