mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 20:23:39 +09:00
test(monitoring): pin the endpoint count the ingress identity test relies on
The ingress assertion reads only the first endpoint of each scrape, so a second endpoint added without the label drop would go unnoticed. Pinning the count makes such an addition fail the suite. Assisted-by: LLM Signed-off-by: ZverGuy <maximbel2003@gmail.com>
This commit is contained in:
1 parent
dca95eb753
commit
5a6086c7a1
3 files changed
+6
-2
No files matched your search
@@ -14,6 +14,9 @@ release:
|
||||
tests:
|
||||
- it: drops the identity on every endpoint
|
||||
asserts:
|
||||
- lengthEqual:
|
||||
path: spec.podMetricsEndpoints
|
||||
count: 1
|
||||
- equal:
|
||||
path: spec.podMetricsEndpoints[0].metricRelabelConfigs
|
||||
value:
|
||||
|
||||
@@ -11,7 +11,7 @@ release:
|
||||
# all three (a placeholder when the pod has no lineage), so with
|
||||
# honorLabels false an exporter's own copy is renamed to exported_* and
|
||||
# dropped. The same rules live in the tenant vmagent of the monitoring
|
||||
# package and are pinned there by an identical suite.
|
||||
# package and are pinned there by the same assertions.
|
||||
tests:
|
||||
- it: every scrape gets the application identity class unless it names another
|
||||
asserts:
|
||||
|
||||
@@ -6,7 +6,8 @@ release:
|
||||
namespace: tenant-foo
|
||||
|
||||
# Same rules as the cluster-wide vmagent in monitoring-agents, pinned there
|
||||
# by an identical suite; see it for why the placeholder and the drop exist.
|
||||
# by the same assertions; see that suite for why the placeholder and the
|
||||
# drop exist.
|
||||
tests:
|
||||
- it: every scrape gets the application identity class unless it names another
|
||||
asserts:
|
||||
|
||||
Reference in new issue
Block a user