nginx-proxy-manager/backend/test
Tom Winnerl b9c19d9db4 fix(review): give the dry-run test's access stub the admin checks
The opt-in nginx dry-run test (NPM_TEST_NGINX=1) called
hostTest.buildHost() with an access stub that only had
token.getUserId. An edit runs the advanced config permission check,
which calls access.hasRole / access.token.hasScope, so the test threw a
TypeError before any of its dry-run checks ran.

The stub is now shaped like lib/access.js. The test also checks that the
permission path really runs: a user without admin rights can test an
edit, but not one that changes the advanced config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 09:03:56 +01:00
..
fixtures/docker test(upstreams): unit tests and Cypress spec 2026-11-14 09:03:56 +01:00
support fix(review): only users who may list every host type see all nginx errors, filter stored nginx output 2026-11-14 09:03:49 +01:00
certificate-renew-lock.test.js fix(review): wait for the renew to start in the renew lock test, not a fixed 50 ms 2026-11-13 19:33:23 +01:00
certificate-suspend.test.js fix(review): leave hosts removed for a certificate request alone until it is done 2026-11-11 13:48:58 +01:00
host-advanced-order.test.js fix(review): check advanced configs for forbidden file directives only after the permission checks, in linear time 2026-11-14 08:23:11 +01:00
host-disable-rejected.test.js fix(review): undo a delete or disable when nginx can't apply the config removal 2026-11-13 19:24:45 +01:00
host-enable-race.test.js fix(review): merge a proxy or redirection host update with the row read under the lock 2026-11-13 19:30:23 +01:00
host-test-advanced.test.js feat: test a host's config without saving (POST /api/nginx/<type>/test) 2026-11-14 09:03:56 +01:00
host-test-disabled.test.js fix(review): test a disabled host as it runs once enabled 2026-11-14 09:03:56 +01:00
host-test.test.js fix(review): count a resolver-only main target as a warning, not healthy 2026-11-14 09:03:56 +01:00
host-update-certificate.test.js fix(review): discard an unused certificate under the nginx lock 2026-11-13 06:12:49 +01:00
nginx-advanced.test.js fix(review): cap the expanded access_log paths checked for one advanced config 2026-11-14 09:03:48 +01:00
nginx-blame.test.js fix(review): reduce a shared-path blame group to the hosts that cause the error 2026-11-13 19:21:55 +01:00
nginx-default-site.test.js fix(review): handle a rejected reload of the default site and of a disable 2026-11-13 06:12:49 +01:00
nginx-dry-run.test.js fix(review): give the dry-run test's access stub the admin checks 2026-11-14 09:03:56 +01:00
nginx-error-details.test.js i18n(locations): translatable location check messages 2026-11-14 09:03:56 +01:00
nginx-errors.test.js fix(review): allow variable forward paths on regex and named locations 2026-11-14 09:03:56 +01:00
nginx-heal-conflict.test.js fix(review): regenerate hosts found broken during a nested repair 2026-11-11 13:48:58 +01:00
nginx-heal-nested.test.js fix(review): regenerate hosts found broken during a nested repair 2026-11-11 13:48:58 +01:00
nginx-includes.test.js fix(review): keep a location static when an included file reads $uri 2026-11-14 09:03:56 +01:00
nginx-location-isolate.test.js fix(review): quarantine a location whose included snippet is broken 2026-11-14 09:03:56 +01:00
nginx-locations-values.test.js chore: adapt to develop nginx-values (location values the API accepts) 2026-11-14 09:03:56 +01:00
nginx-locations.test.js fix(review): apply rewrite-phase guards of included files to cached assets 2026-11-14 09:03:56 +01:00
nginx-lock.test.js test(backend): nginx error parsing, blame, lock and advanced config checks 2026-11-11 13:48:58 +01:00
nginx-own-error.test.js feat: test a host's config without saving (POST /api/nginx/<type>/test) 2026-11-14 09:03:56 +01:00
nginx-reconcile.test.js fix(review): regenerate locations when the dynamic DNS setting changed 2026-11-14 09:03:56 +01:00
nginx-redact.test.js feat(nginx): render custom locations on their own, quarantine the broken ones 2026-11-14 09:03:56 +01:00
nginx-reload-lock.test.js test(backend): certificate renew reloads nginx through the lock, error redaction 2026-11-11 13:48:58 +01:00
nginx-reload-rejected.test.js fix(review): retry the regenerated hosts when the startup reconcile reload throws 2026-11-13 19:27:27 +01:00
nginx-reload.test.js fix(review): take the error log baseline before the child baseline of a reload 2026-11-13 19:28:31 +01:00
nginx-tokenize.test.js fix(review): read unclosed strings in Lua blocks in linear time 2026-11-14 09:03:56 +01:00
nginx-unsafe-value.test.js i18n(locations): translatable location check messages 2026-11-14 09:03:56 +01:00
nginx-values.test.js Stop non-admins injecting nginx directives through host fields 2026-11-10 08:20:02 +10:00
proxy-host-location-advanced.test.js chore: adapt to develop nginx-values (location values the API accepts) 2026-11-14 09:03:56 +01:00
upstream-candidates.test.js fix(review): keep npm.hide containers out of the DNS discovery results 2026-11-14 09:03:56 +01:00
upstream-check.test.js test(upstreams): unit tests and Cypress spec 2026-11-14 09:03:56 +01:00
upstream-dns-discovery.test.js test(upstreams): unit tests and Cypress spec 2026-11-14 09:03:56 +01:00
upstream-dns.test.js test(backend): location rendering, DNS mode and nginx semantics harness 2026-11-14 09:03:56 +01:00
upstream-docker.test.js fix(review): keep npm.hide containers out of the DNS discovery results 2026-11-14 09:03:56 +01:00
upstream-health.test.js fix(review): count a resolver-only main target as a warning, not healthy 2026-11-14 09:03:56 +01:00
upstream-util.test.js test(upstreams): unit tests and Cypress spec 2026-11-14 09:03:56 +01:00