Add query test script and test mode
* Add a mode to test all metric queries * Add a script to run query tests against different versions of PostgeSQL * Add Docker elements for query testing * Switch to using a --config flag when specifying the config file * Fix some metric queries * Allow the agent address to be configured * Allow the sslmode connection parameter to be configured
This commit is contained in:
22
tests/Dockerfile
Normal file
22
tests/Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
FROM alpine:3.21
|
||||
|
||||
RUN apk update && \
|
||||
apk add py3-psycopg2 \
|
||||
py3-yaml \
|
||||
tini
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY src/pgmon.py /app/
|
||||
|
||||
COPY sample-config/pgmon-metrics.yml /app/
|
||||
|
||||
COPY tests/test-config.yml /app/
|
||||
|
||||
COPY --chmod=0600 --chown=postgres:postgres tests/pgpass /root/.pgpass
|
||||
|
||||
ENTRYPOINT ["tini", "--"]
|
||||
|
||||
EXPOSE 5400
|
||||
|
||||
CMD ["/app/pgmon.py", "-c", "/app/test-config.yml", "--test"]
|
||||
Reference in New Issue
Block a user