tests: check for up to 20s if postgresql is running
Grep for the whole path of the binary because its basename is the same as the name of the user all this is running under.
This commit is contained in:
parent
b4193a89b7
commit
f3e435ec35
1 changed files with 16 additions and 2 deletions
|
|
@ -7,6 +7,8 @@ service:
|
|||
packages:
|
||||
rpms:
|
||||
- postgresql-server
|
||||
# seq
|
||||
- coreutils
|
||||
testdependecies:
|
||||
rpms:
|
||||
- postgresql
|
||||
|
|
@ -26,8 +28,20 @@ module:
|
|||
repos:
|
||||
- https://kojipkgs.fedoraproject.org/repos/module-d87b0b15567e47f3-build/latest/x86_64/
|
||||
test:
|
||||
processrunning:
|
||||
- 'ls /proc/*/exe -alh | grep postgres'
|
||||
process_running:
|
||||
- |
|
||||
up=0
|
||||
for i in `seq 20`; do
|
||||
echo "Checking for /usr/bin/postgres process... ($i)"
|
||||
if ls /proc/*/exe -alh 2>/dev/null | grep /usr/bin/postgres; then
|
||||
echo "Found."
|
||||
up=1
|
||||
break
|
||||
else
|
||||
sleep 1
|
||||
fi
|
||||
done
|
||||
test "$up" -ne 0
|
||||
testhost:
|
||||
selfcheck:
|
||||
- 'env PGPASSWORD=mtftest psql -h localhost -U mtftest -f test.sql | egrep "anything|something"'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue