* feat/tests: tests for error handling & metrics in admin endpoints
- TestAdminHandlerErrorHandling - Tests the handler.handleError()
functionality by directly verifying error response formatting
- TestAdminHandlerBuiltinRouteErrors - Tests the error
handling pathway by using real admin server routes and verifying
both error responses and prometheus metrics increments
- provisionAdminRouters: add unit tests for admin handler registration and routing for admin.api
- TestAllowedOriginsUnixSocket: checks unix socket with default origins are added
- TestReplaceRemoteAdminServer: test for replaceRemoteAdminServer with certificate validation, custom origins and cleanup
* test: added test for manage manageIdentity
---------
Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com>
* httpcaddyfile: Fix `protocols` global option parsing
When checking for a block, the current nesting must be used, otherwise it returns the wrong thing.
* Adjust adapt test to cover the broken behaviour that is now fixed
* Fix some admin tests which suddenly run even with -short
Fixed several bugs and made other improvements. All config changes are
now mediated by the global config state manager. It used to be that
initial configs given at startup weren't tracked, so you could start
caddy with --config caddy.json and then do a GET /config/ and it would
return null. That is fixed, along with several other general flow/API
enhancements, with more to come.