open-nomad/nomad
Tim Gross 9dfb51579c
scheduler: refactor system util tests (#16416)
The tests for the system allocs reconciling code path (`diffSystemAllocs`)
include many impossible test environments, such as passing allocs for the wrong
node into the function. This makes the test assertions nonsensible for use in
walking yourself through the correct behavior.

I've pulled this changeset out of PR #16097 so that we can merge these
improvements and revisit the right approach to fix the problem in #16097 with
less urgency now that the PFNR bug fix has been merged. This changeset breaks up
a couple of tests, expands test coverage, and makes test assertions more
clear. It also corrects one bit of production code that behaves fine in
production because of canonicalization, but forces us to remember to set values
in tests to compensate.
2023-03-13 11:59:31 -04:00
..
deploymentwatcher renamed stanza to block for consistency with other projects (#15941) 2023-01-30 15:48:43 +01:00
drainer
mock scheduler: add simple benchmark for tasksUpdated (#16422) 2023-03-13 10:44:14 -05:00
state CSI: fix potential state store corruptions (#16256) 2023-02-27 08:47:08 -05:00
stream eventstream: Handle missing policy documents in event streams (#15495) 2023-02-14 11:27:39 -05:00
structs scheduler: refactor system util tests (#16416) 2023-03-13 11:59:31 -04:00
volumewatcher
acl.go acl: prevent privilege escalation via workload identity 2023-03-13 11:13:27 -04:00
acl_endpoint.go Update ioutil library references to os and io respectively for e2e helper nomad (#16332) 2023-03-08 09:39:03 -06:00
acl_endpoint_test.go Update ioutil library references to os and io respectively for e2e helper nomad (#16332) 2023-03-08 09:39:03 -06:00
acl_test.go acl: prevent privilege escalation via workload identity 2023-03-13 11:13:27 -04:00
alloc_endpoint.go metrics: Add RPC rate metrics to endpoints that validate TLS names (#15900) 2023-01-26 15:04:25 -05:00
alloc_endpoint_test.go WI: allow workloads to use RPCs associated with HTTP API (#15870) 2023-01-25 14:33:06 -05:00
autopilot.go
autopilot_oss.go
autopilot_test.go
blocked_evals.go
blocked_evals_stats.go
blocked_evals_stats_test.go
blocked_evals_system.go
blocked_evals_test.go
client_agent_endpoint.go metrics: measure rate of RPC requests that serve API (#15876) 2023-01-25 16:37:24 -05:00
client_agent_endpoint_test.go
client_alloc_endpoint.go metrics: measure rate of RPC requests that serve API (#15876) 2023-01-25 16:37:24 -05:00
client_alloc_endpoint_test.go
client_csi_endpoint.go metrics: Add rate metrics to Client CSI endpoints (#15905) 2023-01-26 16:40:58 -05:00
client_csi_endpoint_test.go metrics: Add rate metrics to Client CSI endpoints (#15905) 2023-01-26 16:40:58 -05:00
client_fs_endpoint.go metrics: measure rate of RPC requests that serve API (#15876) 2023-01-25 16:37:24 -05:00
client_fs_endpoint_test.go
client_meta_endpoint.go Dynamic Node Metadata (#15844) 2023-02-07 14:42:25 -08:00
client_rpc.go Dynamic Node Metadata (#15844) 2023-02-07 14:42:25 -08:00
client_rpc_test.go
client_stats_endpoint.go Dynamic Node Metadata (#15844) 2023-02-07 14:42:25 -08:00
client_stats_endpoint_test.go
config.go build/cli: Add BuildDate (#16216) 2023-02-27 11:27:40 -06:00
consul.go
consul_oss_test.go
consul_policy.go consul: check for acceptable service identity on consul tokens (#15928) 2023-01-27 18:15:51 -06:00
consul_policy_oss_test.go consul: check for acceptable service identity on consul tokens (#15928) 2023-01-27 18:15:51 -06:00
consul_policy_test.go
consul_test.go
core_sched.go CSI: fix potential state store corruptions (#16256) 2023-02-27 08:47:08 -05:00
core_sched_test.go CSI: fix potential state store corruptions (#16256) 2023-02-27 08:47:08 -05:00
csi_endpoint.go handle FSM.Apply errors in raftApply (#16287) 2023-03-02 13:51:09 -05:00
csi_endpoint_test.go remove most static RPC handlers (#15451) 2022-12-02 10:12:05 -05:00
deployment_endpoint.go metrics: Add RPC rate metrics to endpoints that validate TLS names (#15900) 2023-01-26 15:04:25 -05:00
deployment_endpoint_test.go
deployment_watcher_shims.go
drainer_int_test.go
drainer_shims.go handle FSM.Apply errors in raftApply (#16287) 2023-03-02 13:51:09 -05:00
encrypter.go
encrypter_test.go
endpoints_oss.go provide RPCContext to all RPC handlers (#15430) 2022-12-01 10:05:15 -05:00
eval_broker.go eval broker: use write lock when reaping cancelable evals (#16112) 2023-02-10 10:40:41 -05:00
eval_broker_test.go eval broker: use write lock when reaping cancelable evals (#16112) 2023-02-10 10:40:41 -05:00
eval_endpoint.go metrics: Add RPC rate metrics to endpoints that validate TLS names (#15900) 2023-01-26 15:04:25 -05:00
eval_endpoint_test.go
event_endpoint.go Update ioutil library references to os and io respectively for e2e helper nomad (#16332) 2023-03-08 09:39:03 -06:00
event_endpoint_test.go
fsm.go renamed stanza to block for consistency with other projects (#15941) 2023-01-30 15:48:43 +01:00
fsm_oss.go
fsm_registry_oss.go
fsm_test.go core: enforce strict steps for clients reconnect (#15808) 2023-01-25 15:53:59 -05:00
heartbeat.go remove most static RPC handlers (#15451) 2022-12-02 10:12:05 -05:00
heartbeat_test.go
job_endpoint.go remove backcompat support for non-atomic job registration (#16305) 2023-03-03 15:52:22 -05:00
job_endpoint_hook_connect.go renamed stanza to block for consistency with other projects (#15941) 2023-01-30 15:48:43 +01:00
job_endpoint_hook_connect_test.go provide RPCContext to all RPC handlers (#15430) 2022-12-01 10:05:15 -05:00
job_endpoint_hook_expose_check.go
job_endpoint_hook_expose_check_test.go
job_endpoint_hook_vault.go
job_endpoint_hook_vault_oss.go
job_endpoint_hooks.go Allow configurable range of Job priorities (#16084) 2023-02-17 09:23:13 -05:00
job_endpoint_hooks_test.go Allow configurable range of Job priorities (#16084) 2023-02-17 09:23:13 -05:00
job_endpoint_oss.go
job_endpoint_oss_test.go
job_endpoint_test.go remove backcompat support for non-atomic job registration (#16305) 2023-03-03 15:52:22 -05:00
job_endpoint_validators.go
job_endpoint_validators_test.go
keyring_endpoint.go handle FSM.Apply errors in raftApply (#16287) 2023-03-02 13:51:09 -05:00
keyring_endpoint_test.go
leader.go remove backcompat support for non-atomic job registration (#16305) 2023-03-03 15:52:22 -05:00
leader_oss.go
leader_test.go cleanup: remove usage of consul/sdk/testutil/retry (#15609) 2023-01-02 08:06:20 -06:00
merge.go
namespace_endpoint.go handle FSM.Apply errors in raftApply (#16287) 2023-03-02 13:51:09 -05:00
namespace_endpoint_test.go acl: Fix panic when bogus token is passed (#15863) 2023-01-25 10:03:17 -05:00
node_endpoint.go scheduler: correctly detect inplace update with wildcard datacenters (#16362) 2023-03-07 10:05:59 -05:00
node_endpoint_test.go core: enforce strict steps for clients reconnect (#15808) 2023-01-25 15:53:59 -05:00
operator_endpoint.go handle FSM.Apply errors in raftApply (#16287) 2023-03-02 13:51:09 -05:00
operator_endpoint_test.go Update ioutil library references to os and io respectively for e2e helper nomad (#16332) 2023-03-08 09:39:03 -06:00
periodic.go remove backcompat support for non-atomic job registration (#16305) 2023-03-03 15:52:22 -05:00
periodic_endpoint.go metrics: measure rate of RPC requests that serve API (#15876) 2023-01-25 16:37:24 -05:00
periodic_endpoint_test.go
periodic_test.go main: remove deprecated uses of rand.Seed (#16074) 2023-02-07 09:19:38 -06:00
plan_apply.go
plan_apply_node_tracker.go deps: upgrade to hashicorp/golang-lru/v2 (#16085) 2023-02-08 15:20:33 -06:00
plan_apply_node_tracker_test.go deps: upgrade to hashicorp/golang-lru/v2 (#16085) 2023-02-08 15:20:33 -06:00
plan_apply_oss.go
plan_apply_pool.go
plan_apply_pool_test.go
plan_apply_test.go
plan_endpoint.go metrics: Add RPC rate metrics to endpoints that validate TLS names (#15900) 2023-01-26 15:04:25 -05:00
plan_endpoint_test.go
plan_normalization_test.go
plan_queue.go
plan_queue_test.go
raft_rpc.go
regions_endpoint.go metrics: Add metrics to unauthenticated endpoints (#15899) 2023-01-26 15:05:51 -05:00
regions_endpoint_test.go
rpc.go handle FSM.Apply errors in raftApply (#16287) 2023-03-02 13:51:09 -05:00
rpc_rate_metrics.go add metric for count of RPC requests (#15515) 2023-01-24 11:54:20 -05:00
rpc_test.go Update ioutil library references to os and io respectively for e2e helper nomad (#16332) 2023-03-08 09:39:03 -06:00
scaling_endpoint.go metrics: measure rate of RPC requests that serve API (#15876) 2023-01-25 16:37:24 -05:00
scaling_endpoint_test.go
search_endpoint.go metrics: measure rate of RPC requests that serve API (#15876) 2023-01-25 16:37:24 -05:00
search_endpoint_oss.go
search_endpoint_test.go
serf.go
serf_test.go
server.go Update ioutil library references to os and io respectively for e2e helper nomad (#16332) 2023-03-08 09:39:03 -06:00
server_setup.go build/cli: Add BuildDate (#16216) 2023-02-27 11:27:40 -06:00
server_setup_oss.go
server_test.go implement pre-forwarding auth on select RPCs (#15513) 2023-01-24 10:52:07 -05:00
service_registration_endpoint.go service: fix regression in task access to list/read endpoint (#16316) 2023-03-03 11:41:19 -05:00
service_registration_endpoint_test.go service: fix regression in task access to list/read endpoint (#16316) 2023-03-03 11:41:19 -05:00
stats_fetcher.go metrics: Add metrics to unauthenticated endpoints (#15899) 2023-01-26 15:05:51 -05:00
stats_fetcher_test.go
status_endpoint.go metrics: Add metrics to unauthenticated endpoints (#15899) 2023-01-26 15:05:51 -05:00
status_endpoint_test.go implement pre-forwarding auth on select RPCs (#15513) 2023-01-24 10:52:07 -05:00
system_endpoint.go metrics: measure rate of RPC requests that serve API (#15876) 2023-01-25 16:37:24 -05:00
system_endpoint_test.go
testing.go [core] Do not start the plugin loader on non-clients (#16111) 2023-02-10 15:33:16 -05:00
testing_oss.go
timetable.go
timetable_test.go
util.go
util_test.go
variables_endpoint.go acl: prevent privilege escalation via workload identity 2023-03-13 11:13:27 -04:00
variables_endpoint_test.go acl: prevent privilege escalation via workload identity 2023-03-13 11:13:27 -04:00
vault.go vault: configure user agent on Nomad vault clients (#15745) 2023-01-10 10:39:45 -06:00
vault_test.go
vault_testing.go
worker.go core: backoff considerably when worker is behind raft (#15523) 2023-01-24 08:56:35 -05:00
worker_string_schedulerworkerstatus.go
worker_string_workerstatus.go
worker_test.go core: backoff considerably when worker is behind raft (#15523) 2023-01-24 08:56:35 -05:00