python3Packages.py-air-control-exporter: add passthru.tests

This change adds integration tests to the py-air-control-exporter package. These tests verify that the exporter exports metrics correctly in an actual NixOS virtual machine.
This commit is contained in:
Matej Urbas 2021-01-01 12:34:24 +00:00
parent c4c899d3ef
commit 49d63b570e

View File

@ -1,5 +1,6 @@
{ buildPythonPackage, fetchPypi, flask, isPy27, lib, prometheus_client
, py-air-control, pytestCheckHook, pytestcov, pytestrunner, setuptools_scm }:
{ buildPythonPackage, fetchPypi, flask, isPy27, lib, nixosTests
, prometheus_client, py-air-control, pytestCheckHook, pytestcov, pytestrunner
, setuptools_scm }:
buildPythonPackage rec {
pname = "py-air-control-exporter";
@ -15,6 +16,8 @@ buildPythonPackage rec {
checkInputs = [ pytestCheckHook pytestcov pytestrunner ];
propagatedBuildInputs = [ flask prometheus_client py-air-control ];
passthru.tests = { inherit (nixosTests.prometheus-exporters) py-air-control; };
meta = with lib; {
description = "Exports Air Quality Metrics to Prometheus.";
homepage = "https://github.com/urbas/py-air-control-exporter";