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
d2883b95
Commit
d2883b95
authored
Jan 27, 2022
by
John McDonnell
Committed by
Ramya Authappan
Jan 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add health check for postgres in gitaly E2E
parent
e8e46790
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
qa/qa/service/praefect_manager.rb
qa/qa/service/praefect_manager.rb
+11
-1
qa/qa/service/shellout.rb
qa/qa/service/shellout.rb
+5
-3
No files found.
qa/qa/service/praefect_manager.rb
View file @
d2883b95
...
@@ -174,7 +174,7 @@ module QA
...
@@ -174,7 +174,7 @@ module QA
end
end
def
start_all_nodes
def
start_all_nodes
start_
node
(
@postgres
)
start_
postgres
start_node
(
@primary_node
)
start_node
(
@primary_node
)
start_node
(
@secondary_node
)
start_node
(
@secondary_node
)
start_node
(
@tertiary_node
)
start_node
(
@tertiary_node
)
...
@@ -183,6 +183,16 @@ module QA
...
@@ -183,6 +183,16 @@ module QA
wait_for_health_check_all_nodes
wait_for_health_check_all_nodes
end
end
def
start_postgres
start_node
(
@postgres
)
Support
::
Waiter
.
repeat_until
(
max_attempts:
60
,
sleep_interval:
1
)
do
shell
(
sql_to_docker_exec_cmd
(
"SELECT 1 as healthy_database"
),
fail_on_exception:
false
)
do
|
line
|
break
true
if
line
.
include?
(
"healthy_database"
)
end
end
end
def
verify_storage_move
(
source_storage
,
destination_storage
,
repo_type: :project
)
def
verify_storage_move
(
source_storage
,
destination_storage
,
repo_type: :project
)
return
if
Specs
::
Helpers
::
ContextSelector
.
dot_com?
return
if
Specs
::
Helpers
::
ContextSelector
.
dot_com?
...
...
qa/qa/service/shellout.rb
View file @
d2883b95
...
@@ -13,23 +13,25 @@ module QA
...
@@ -13,23 +13,25 @@ module QA
# TODO, make it possible to use generic QA framework classes
# TODO, make it possible to use generic QA framework classes
# as a library - gitlab-org/gitlab-qa#94
# as a library - gitlab-org/gitlab-qa#94
#
#
def
shell
(
command
,
stdin_data:
nil
)
def
shell
(
command
,
stdin_data:
nil
,
fail_on_exception:
true
)
puts
"Executing `
#{
command
}
`"
puts
"Executing `
#{
command
}
`"
Open3
.
popen2e
(
*
command
)
do
|
stdin
,
out
,
wait
|
Open3
.
popen2e
(
*
command
)
do
|
stdin
,
out
,
wait
|
stdin
.
puts
(
stdin_data
)
if
stdin_data
stdin
.
puts
(
stdin_data
)
if
stdin_data
stdin
.
close
if
stdin_data
stdin
.
close
if
stdin_data
cmd_output
=
''
if
block_given?
if
block_given?
out
.
each
do
|
line
|
out
.
each
do
|
line
|
cmd_output
+=
line
yield
line
yield
line
end
end
end
end
out
.
each_char
{
|
char
|
print
char
}
out
.
each_char
{
|
char
|
print
char
}
if
wait
.
value
.
exited?
&&
wait
.
value
.
exitstatus
.
nonzero?
if
wait
.
value
.
exited?
&&
wait
.
value
.
exitstatus
.
nonzero?
&&
fail_on_exception
raise
CommandError
,
"Command
`
#{
command
}
` failed!
"
raise
CommandError
,
"Command
failed:
#{
command
}
\n
Command Output:
#{
cmd_output
}
"
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