add files for modularity-testing-framework based tests
Currently there seems to be an issue with passing the test command line to the shell in the container, though.
This commit is contained in:
parent
1ae18a54f9
commit
9c069c4141
2 changed files with 44 additions and 0 deletions
39
tests/config.yaml
Normal file
39
tests/config.yaml
Normal file
|
|
@ -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'
|
||||
|
||||
5
tests/test.sql
Normal file
5
tests/test.sql
Normal file
|
|
@ -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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue