open-vault/http
Nick Cabatoff 12e1b609ac
Create global quotas of each type in every NewTestCluster. (#18038)
Create global quotas of each type in every NewTestCluster.  Also switch some key locks to use DeadlockMutex to make it easier to discover deadlocks in testing.

NewTestCluster also now starts the cluster, and the Start method becomes a no-op.  Unless SkipInit is provided, we also wait for a node to become active, eliminating the need for WaitForActiveNode.  This was needed because otherwise we can't safely make the quota api call.  We can't do it in Start because Start doesn't return an error, and I didn't want to begin storing the testing object T instead TestCluster just so we could call t.Fatal inside Start. 

The last change here was to address the problem of how to skip setting up quotas when creating a cluster with a nonstandard handler that might not even implement the quotas endpoint.  The challenge is that because we were taking a func pointer to generate the real handler func, we didn't have any way to compare that func pointer to the standard handler-generating func http.Handler without creating a circular dependency between packages vault and http.  The solution was to pass a method instead of an anonymous func pointer so that we can do reflection on it.
2022-11-29 14:38:33 -05:00
..
web_ui Make web_ui complient with Go's native embedding (#14246) 2022-02-24 09:12:36 -05:00
assets.go update gofumpt to 0.3.1 and reformat the repo (#17055) 2022-09-07 17:31:20 -07:00
assets_stub.go Convert to Go 1.17 go:build directive (#13579) 2022-01-05 12:02:03 -06:00
auth_token_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
cors.go Migrate to sdk/internalshared libs in go-secure-stdlib (#12090) 2021-07-15 20:17:31 -04:00
custom_header_test.go reformat using 'make fmt' (#13794) 2022-01-27 10:06:34 -08:00
forwarded_for_test.go Create global quotas of each type in every NewTestCluster. (#18038) 2022-11-29 14:38:33 -05:00
forwarding_bench_test.go Update deps for consul-template 0.29.0 (#15293) 2022-05-05 10:30:40 -07:00
forwarding_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
handler.go Create global quotas of each type in every NewTestCluster. (#18038) 2022-11-29 14:38:33 -05:00
handler_test.go Plugins: Consistently use plugin_version (#17171) 2022-09-20 12:35:50 +01:00
help.go Vault-4010 Unauthenticated panic when processing "help" requests (#14704) 2022-03-24 12:19:14 -07:00
help_test.go Vault-4010 Unauthenticated panic when processing "help" requests (#14704) 2022-03-24 12:19:14 -07:00
http_test.go Customizing HTTP headers in the config file (#12485) 2021-10-13 11:06:33 -04:00
logical.go update gofumpt to 0.3.1 and reformat the repo (#17055) 2022-09-07 17:31:20 -07:00
logical_test.go Parse query parameters for GET request turned in logical.ListOperation (#16991) 2022-09-02 14:21:25 -07:00
plugin_test.go Support version selection for database plugins (#16982) 2022-09-09 17:32:28 +01:00
sys_audit_test.go Re-add injecting into top routes (#5244) 2018-09-05 11:45:17 -04:00
sys_auth_test.go Plugins: Update running version everywhere running sha256 is set (#17292) 2022-09-23 11:19:38 +01:00
sys_config_cors_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
sys_config_state_test.go Vault 3992 ToB Config and Plugins Permissions (#14817) 2022-04-04 09:45:41 -07:00
sys_feature_flags.go Feature flags API (#10613) 2021-01-06 16:05:00 -06:00
sys_generate_root.go SSCT Tokens Feature [OSS] (#14109) 2022-02-17 11:43:07 -08:00
sys_generate_root_test.go SSCT Tokens Feature [OSS] (#14109) 2022-02-17 11:43:07 -08:00
sys_health.go Migrate to sdk/internalshared libs in go-secure-stdlib (#12090) 2021-07-15 20:17:31 -04:00
sys_health_test.go OSS parts of #1891 (sys/health license addition) (#11676) 2021-05-20 13:32:15 -04:00
sys_hostinfo_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
sys_in_flight_requests.go reformat using 'make fmt' (#13794) 2022-01-27 10:06:34 -08:00
sys_in_flight_requests_test.go VAULT-1564 report in-flight requests (#13024) 2021-12-08 17:34:42 -05:00
sys_init.go Validate parameters for vault operator init (#16379) 2022-07-25 12:45:04 -07:00
sys_init_test.go OSS portion of wrapper-v2 (#16811) 2022-08-23 15:37:16 -04:00
sys_internal_test.go Kv preflight (#4430) 2018-04-23 15:00:02 -07:00
sys_leader.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
sys_leader_test.go core: Record the time a node became active (#10489) 2020-12-11 16:50:19 -08:00
sys_lease_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
sys_metrics.go Customizing HTTP headers in the config file (#12485) 2021-10-13 11:06:33 -04:00
sys_metrics_test.go Authenticate to "login" endpoint for non-existent mount path bug (#13162) 2021-11-22 17:06:59 -08:00
sys_monitor_test.go api/monitor: Adding log format to monitor command and debug (#15536) 2022-05-24 13:10:53 -04:00
sys_mount_test.go Plugins: Consistently use plugin_version (#17171) 2022-09-20 12:35:50 +01:00
sys_mounts_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
sys_policy_test.go Re-add injecting into top routes (#5244) 2018-09-05 11:45:17 -04:00
sys_raft.go Use %q for quoted strings where appropriate (#15216) 2022-08-03 12:32:45 -06:00
sys_rekey.go Support processing parameters sent as a URL-encoded form (#8325) 2020-02-12 14:20:22 -08:00
sys_rekey_test.go The big one (#5346) 2018-09-17 23:03:00 -04:00
sys_rotate_test.go OSS side barrier encryption tracking and automatic rotation (#11007) 2021-02-25 14:27:25 -06:00
sys_seal.go Implement sys/seal-status and sys/leader in system backend (#10725) 2021-01-20 14:04:24 -06:00
sys_seal_test.go Make the error and http code clearer when supplying wrong unseal key (#17836) 2022-11-28 16:01:47 -08:00
sys_wrapping_test.go VAULT-7698 Fix ignored parameter warnings for endpoint arbitrary data options (#16794) 2022-08-23 08:51:23 -04:00
testing.go Create global quotas of each type in every NewTestCluster. (#18038) 2022-11-29 14:38:33 -05:00
unwrapping_raw_body_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
util.go VAULT-6614 Enable role based quotas for lease-count quotas (OSS) (#16157) 2022-07-05 13:02:00 -04:00