robusta-dev / prometrix Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
migrate to Pytest for testing
See the docs here
I think you could test if cluster by calling:
${url}:8481/admin/tenants
the flags url would be:
${url}:8481/flags
and query for ${tenant} (the default is 0) would be:
${url}:8481/select/${tenant}/prometheus/api/v1/query?query=example
My current workaround is to set:
prometheus_url: http://vmselect-k8s-victoria-metrics-k8s-stack.monitoring.svc.cluster.local:8481/select/0/prometheus
There seem to be some releases in PyPI, but those are not available in Github as tags or releases. Could you please add those? Otherwise packaging this becomes a PITA... :-)
Hey there! would be nice to have a support for Amazon Managed Service for Prometheus
I am trying to package this for openSUSE, but the tests are failing with a missing fixture.
I have found no hint on which test dependencies I might be missing. I found no requirements.txt or similar, only some runtime dependencies inside the pyproject.toml.
Is this documented somewhere? If not, could this be documented?
Thanks!
[ 12s] ============================= test session starts ==============================
[ 12s] platform linux -- Python 3.9.18, pytest-7.4.2, pluggy-1.0.0 -- /usr/bin/python3.9
[ 12s] cachedir: .pytest_cache
[ 12s] rootdir: /home/abuild/rpmbuild/BUILD/prometrix-ca3e889c11b51ec5dcb0e7a47dae6e724be96e7e
[ 12s] plugins: lazy-fixture-0.6.3
[ 13s] collecting ... collected 1 item
[ 13s]
[ 13s] tests/main.py::test_label ERROR [100%]
[ 13s]
[ 13s] ==================================== ERRORS ====================================
[ 13s] _________________________ ERROR at setup of test_label _________________________
[ 13s] file /home/abuild/rpmbuild/BUILD/prometrix-ca3e889c11b51ec5dcb0e7a47dae6e724be96e7e/tests/main.py, line 28
[ 13s] def test_label(prom: CustomPrometheusConnect) -> bool:
[ 13s] E fixture 'prom' not found
[ 13s] > available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
[ 13s] > use 'pytest --fixtures [testpath]' for help on them.
[ 13s]
[ 13s] /home/abuild/rpmbuild/BUILD/prometrix-ca3e889c11b51ec5dcb0e7a47dae6e724be96e7e/tests/main.py:28
[ 13s] =========================== short test summary info ============================
[ 13s] ERROR tests/main.py::test_label
[ 13s] =============================== 1 error in 0.61s ===============================
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.