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
de0fa351
Commit
de0fa351
authored
Nov 14, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement QA factory for enabling hashed storage
[ci skip]
parent
db7037bf
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
9 deletions
+70
-9
qa/qa.rb
qa/qa.rb
+5
-0
qa/qa/ee/scenario/test/geo.rb
qa/qa/ee/scenario/test/geo.rb
+7
-7
qa/qa/page/admin/menu.rb
qa/qa/page/admin/menu.rb
+9
-2
qa/qa/page/admin/settings.rb
qa/qa/page/admin/settings.rb
+17
-0
qa/qa/page/base.rb
qa/qa/page/base.rb
+8
-0
qa/qa/scenario/gitlab/admin/hashed_storage.rb
qa/qa/scenario/gitlab/admin/hashed_storage.rb
+24
-0
No files found.
qa/qa.rb
View file @
de0fa351
...
...
@@ -49,6 +49,10 @@ module QA
module
Sandbox
autoload
:Prepare
,
'qa/scenario/gitlab/sandbox/prepare'
end
module
Admin
autoload
:HashedStorage
,
'qa/scenario/gitlab/admin/hashed_storage'
end
end
end
...
...
@@ -81,6 +85,7 @@ module QA
module
Admin
autoload
:Menu
,
'qa/page/admin/menu'
autoload
:Settings
,
'qa/page/admin/settings'
end
module
Mattermost
...
...
qa/qa/ee/scenario/test/geo.rb
View file @
de0fa351
...
...
@@ -11,10 +11,9 @@ module QA
attribute
:geo_secondary_name
,
'--secondary-name SECONDARY_NAME'
def
perform
(
**
args
)
# TODO, abstract this away in the Factory module
# TODO, Factory::License -> gitlab-org/gitlab-qa#86
#
QA
::
Specs
::
Config
.
act
{
configure_capybara!
}
# TODO, devise a way to decouple licence factory from Runtime.gitlab_address
QA
::
Runtime
::
Scenario
.
define
(
:gitlab_address
,
args
[
:geo_primary_address
])
Geo
::
Primary
.
act
do
...
...
@@ -45,17 +44,19 @@ module QA
end
def
add_license
# TODO
move ENV call to the scenario
# TODO
EE license to Runtime.license, gitlab-org/gitlab-qa#86
#
Scenario
::
License
::
Add
.
perform
(
ENV
[
'EE_LICENSE'
])
end
def
enable_hashed_storage
# TODO implement hashed storage factory
# TODO, Factory::HashedStorage - gitlab-org/gitlab-qa#86
#
QA
::
Scenario
::
Gitlab
::
Admin
::
HashedStorage
.
perform
(
:enabled
)
end
def
add_secondary_node
# TODO
implement secondary node factory
# TODO
EE::Factory::GeoNode - gitlab-org/gitlab-qa#86
end
def
set_replication_password
...
...
@@ -83,7 +84,6 @@ module QA
require
'uri'
host
=
URI
(
QA
::
Runtime
::
Scenario
.
geo_primary_address
).
host
host
=
'172.22.0.2'
#tmp
slot
=
QA
::
Runtime
::
Scenario
.
geo_primary_name
.
tr
(
'-'
,
'_'
)
gitlab_ctl
"replicate-geo-database --host=
#{
host
}
--slot-name=
#{
slot
}
"
\
...
...
qa/qa/page/admin/menu.rb
View file @
de0fa351
...
...
@@ -2,9 +2,16 @@ module QA
module
Page
module
Admin
class
Menu
<
Page
::
Base
def
go_to_geo_nodes
click_link
'Geo Nodes'
end
def
go_to_license
link
=
find_link
'License'
link
.
click
click_link
'License'
end
def
go_to_settings
click_link
'Settings'
end
end
end
...
...
qa/qa/page/admin/settings.rb
0 → 100644
View file @
de0fa351
module
QA
module
Page
module
Admin
class
Settings
<
Page
::
Base
def
enable_hashed_storage
check
'Create new projects using hashed storage paths'
end
def
save_settings
scroll_to
'.form-actions'
do
click_button
'Save'
end
end
end
end
end
end
qa/qa/page/base.rb
View file @
de0fa351
...
...
@@ -9,6 +9,14 @@ module QA
def
refresh
visit
current_path
end
def
scroll_to
(
css
,
&
block
)
page
.
execute_script
<<~
JS
document.getElementsByClassName("
#{
css
.
sub
(
/^\./
,
''
)
}
")[0].scrollIntoView();
JS
page
.
within
(
css
,
&
block
)
end
end
end
end
qa/qa/scenario/gitlab/admin/hashed_storage.rb
0 → 100644
View file @
de0fa351
module
QA
module
Scenario
module
Gitlab
module
Admin
class
HashedStorage
<
Scenario
::
Template
def
perform
(
*
traits
)
raise
ArgumentError
unless
traits
.
include?
(
:enabled
)
Page
::
Main
::
Entry
.
act
{
sign_in_using_credentials
}
Page
::
Main
::
Menu
.
act
{
go_to_admin_area
}
Page
::
Admin
::
Menu
.
act
{
go_to_settings
}
Page
::
Admin
::
Settings
.
act
do
enable_hashed_storage
save_settings
end
QA
::
Page
::
Main
::
Menu
.
act
{
sign_out
}
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