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.
53 lines
1.8 KiB
YAML
53 lines
1.8 KiB
YAML
document: modularity-testing
|
|
version: 1
|
|
name: postgresql
|
|
modulemd-url: https://src.fedoraproject.org/cgit/modules/postgresql.git/tree/postgresql.yaml?h=f26
|
|
service:
|
|
port: 5432
|
|
packages:
|
|
rpms:
|
|
- postgresql-server
|
|
# seq
|
|
- coreutils
|
|
testdependecies:
|
|
rpms:
|
|
- postgresql
|
|
- systemd
|
|
module:
|
|
docker:
|
|
start: "docker run -it -p 5432:5432 -e POSTGRESQL_USER=mtftest -e POSTGRESQL_PASSWORD=mtftest -e POSTGRESQL_DATABASE=mtftest"
|
|
labels:
|
|
description: "PostgreSQL is an advanced Object-Relational database management system (DBMS)."
|
|
io.k8s.description: "PostgreSQL is an advanced Object-Relational database management system (DBMS)."
|
|
source: https://github.com/container-images/postgresql.git
|
|
container: docker.io/modularitycontainers/postgresql
|
|
rpm:
|
|
start: systemctl start postgresql
|
|
stop: systemctl stop postgresql
|
|
status: systemctl status postgresql
|
|
repos:
|
|
- https://kojipkgs.fedoraproject.org/repos/module-d87b0b15567e47f3-build/latest/x86_64/
|
|
test:
|
|
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"'
|
|
#- 'echo errr | nc localhost 11211'
|
|
#- 'echo set AAA 0 4 2 | nc localhost 11211'
|
|
#- 'echo get AAA | nc localhost 11211'
|
|
#selcheckError:
|
|
#- 'echo errr | nc localhost 11211 |grep ERROR'
|
|
|