open-nomad/command
Mahmood Ali 7b8cfee162 tests: deflake TestHTTP_FreshClientAllocMetrics
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"
      }
    },
```
2019-11-22 18:41:21 -05:00
..
agent
assets
test-resources
acl.go
acl_bootstrap.go
acl_bootstrap_test.go
acl_policy.go
acl_policy_apply.go
acl_policy_apply_test.go
acl_policy_delete.go
acl_policy_delete_test.go
acl_policy_info.go
acl_policy_info_test.go
acl_policy_list.go
acl_policy_list_test.go
acl_token.go
acl_token_create.go
acl_token_create_test.go
acl_token_delete.go
acl_token_delete_test.go
acl_token_info.go
acl_token_info_test.go
acl_token_list.go
acl_token_list_test.go
acl_token_self.go
acl_token_self_test.go
acl_token_update.go
acl_token_update_test.go
agent_info.go
agent_info_test.go
agent_monitor.go
agent_monitor_test.go
alloc.go
alloc_exec.go
alloc_exec_test.go
alloc_exec_unix.go
alloc_exec_windows.go
alloc_fs.go
alloc_fs_test.go
alloc_logs.go
alloc_logs_test.go
alloc_restart.go
alloc_restart_test.go
alloc_signal.go
alloc_signal_test.go
alloc_status.go
alloc_status_test.go
alloc_stop.go
alloc_stop_test.go
check.go
check_test.go
commands.go
data_format.go
data_format_test.go
deployment.go
deployment_fail.go
deployment_fail_test.go
deployment_list.go
deployment_list_test.go
deployment_pause.go
deployment_pause_test.go
deployment_promote.go
deployment_promote_test.go
deployment_resume.go
deployment_resume_test.go
deployment_status.go
deployment_status_test.go
eval.go
eval_status.go
eval_status_test.go
helper_devices.go
helper_devices_test.go
helpers.go
helpers_test.go
integration_test.go
job.go
job_deployments.go
job_deployments_test.go
job_dispatch.go
job_dispatch_test.go
job_eval.go
job_eval_test.go
job_history.go
job_history_test.go
job_init.bindata_assetfs.go
job_init.go
job_init_test.go
job_inspect.go
job_inspect_test.go
job_periodic.go
job_periodic_force.go
job_periodic_force_test.go
job_plan.go
job_plan_test.go
job_promote.go
job_promote_test.go
job_revert.go
job_revert_test.go
job_run.go
job_run_test.go
job_status.go
job_status_test.go
job_stop.go
job_stop_test.go
job_validate.go
job_validate_test.go
meta.go
meta_test.go
monitor.go
monitor_test.go
namespace.go
namespace_apply.go
namespace_apply_test.go
namespace_delete.go
namespace_delete_test.go
namespace_inspect.go
namespace_inspect_test.go
namespace_list.go
namespace_list_test.go
namespace_status.go
namespace_status_test.go
node.go
node_config.go
node_config_test.go
node_drain.go
node_drain_test.go
node_eligibility.go
node_eligibility_test.go
node_status.go
node_status_test.go
operator.go
operator_autopilot.go
operator_autopilot_get.go
operator_autopilot_get_test.go
operator_autopilot_set.go
operator_autopilot_set_test.go
operator_autopilot_test.go
operator_keygen.go
operator_keygen_test.go
operator_keyring.go
operator_raft.go
operator_raft_list.go
operator_raft_list_test.go
operator_raft_remove.go
operator_raft_remove_test.go
operator_raft_test.go
operator_test.go
quota.go
quota_apply.go
quota_apply_test.go
quota_delete.go
quota_delete_test.go
quota_init.go
quota_init_test.go
quota_inspect.go
quota_inspect_test.go
quota_list.go
quota_list_test.go
quota_status.go
quota_status_test.go
sentinel.go
sentinel_apply.go
sentinel_apply_test.go
sentinel_delete.go
sentinel_delete_test.go
sentinel_list.go
sentinel_list_test.go
sentinel_read.go
sentinel_read_test.go
server.go
server_force_leave.go
server_force_leave_test.go
server_join.go
server_join_test.go
server_members.go
server_members_test.go
status.go
status_test.go
ui.go
util_test.go
version.go
version_test.go