diff --git a/tests/config.yaml b/tests/config.yaml new file mode 100644 index 0000000..8780ba2 --- /dev/null +++ b/tests/config.yaml @@ -0,0 +1,39 @@ +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 +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 memcached + repos: + - https://kojipkgs.fedoraproject.org/repos/module-d87b0b15567e47f3-build/latest/x86_64/ +test: + processrunning: + - 'ls /proc/*/exe -alh | grep postgres' +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' + diff --git a/tests/test.sql b/tests/test.sql new file mode 100644 index 0000000..5ecc838 --- /dev/null +++ b/tests/test.sql @@ -0,0 +1,5 @@ +CREATE TABLE mtftest (id SERIAL NOT NULL, anything VARCHAR(255) NOT NULL); + +INSERT INTO mtftest (anything) VALUES ('something'); + +SELECT anything FROM mtftest;