7b8cfee162
The test asserts that alloc counts get reported accurately in metrics by inspecting the metrics endpoint directly. Sadly, the metrics as collected by `armon/go-metrics` seem to be stateful and may contain info from other tests. This means that the test can fail depending on the order of returned metrics. Inspecting the metrics output of one failing run, you can see the duplicate guage entries but for different node_ids: ``` { "Name": "service-name.default-0a3ba4b6-2109-485e-be74-6864228aed3d.client.allocations.terminal", "Value": 10, "Labels": { "datacenter": "dc1", "node_class": "none", "node_id": "67402bf4-00f3-bd8d-9fa8-f4d1924a892a" } }, { "Name": "service-name.default-0a3ba4b6-2109-485e-be74-6864228aed3d.client.allocations.terminal", "Value": 0, "Labels": { "datacenter": "dc1", "node_class": "none", "node_id": "a2945b48-7e66-68e2-c922-49b20dd4e20c" } }, ``` |
||
---|---|---|
.. | ||
consul | ||
monitor | ||
test-resources | ||
testdata | ||
acl_endpoint.go | ||
acl_endpoint_test.go | ||
agent.go | ||
agent_endpoint.go | ||
agent_endpoint_test.go | ||
agent_test.go | ||
alloc_endpoint.go | ||
alloc_endpoint_test.go | ||
bindata_assetfs.go | ||
command.go | ||
command_test.go | ||
config.go | ||
config_oss.go | ||
config_parse.go | ||
config_parse_test.go | ||
config_test.go | ||
deployment_endpoint.go | ||
deployment_endpoint_test.go | ||
eval_endpoint.go | ||
eval_endpoint_test.go | ||
fs_endpoint.go | ||
fs_endpoint_test.go | ||
helpers.go | ||
helpers_test.go | ||
http.go | ||
http_oss.go | ||
http_test.go | ||
job_endpoint.go | ||
job_endpoint_test.go | ||
keyring.go | ||
keyring_test.go | ||
log_file.go | ||
log_file_test.go | ||
log_levels.go | ||
log_levels_test.go | ||
metrics_endpoint.go | ||
metrics_endpoint_test.go | ||
node_endpoint.go | ||
node_endpoint_test.go | ||
operator_endpoint.go | ||
operator_endpoint_test.go | ||
plugins.go | ||
region_endpoint.go | ||
region_endpoint_test.go | ||
retry_join.go | ||
retry_join_test.go | ||
search_endpoint.go | ||
search_endpoint_test.go | ||
stats_endpoint.go | ||
stats_endpoint_test.go | ||
status_endpoint.go | ||
status_endpoint_test.go | ||
stub_asset.go | ||
syslog.go | ||
syslog_test.go | ||
system_endpoint.go | ||
system_endpoint_test.go | ||
testagent.go | ||
testingutils_test.go |