You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ashishvijaywargiya (via GitHub)" <gi...@apache.org> on 2026/08/21 18:57:17 UTC

[PR] Implemented: per-component override of test.api.enabled REST test-run API [ofbiz-framework]

ashishvijaywargiya opened a new pull request, #1698:
URL: https://github.com/apache/ofbiz-framework/pull/1698

   Implemented: per-component override of test.api.enabled REST test-run API
   
   (OFBIZ-)
   
   Explanation
   test.api.enabled (framework/testtools/config/testtools.properties, checked in
   TestRunServices.runTestSuite) is a single global on/off switch for the REST-triggered
   test execution API. There was no way to disable just one component's test-run REST
   endpoint while leaving the API on for every other component - the only workarounds were
   removing the TestRunResource block from a component's *.rest.xml (code change + redeploy)
   or revoking the TESTEXEC/TESTEXEC_ADMIN permission (not component-specific, affects any
   component sharing the same permission).
   
   This adds a new property, test.api.enabled.<componentName>, read through the same
   EntityUtilProperties/SystemProperty-backed mechanism the global flag already uses - so it
   can be flipped live via a SystemProperty row, without a restart, the same way the global
   flag already can. Defaults to enabled ("true") when unset, so there is no behavior change
   for any component that doesn't use it. Only consulted once the global flag is already
   true, and only gates triggering new runs (runTestSuite) - not status polling
   (getTestRunStatus/getScopedTestRunStatus).
   
   Because runScopedTestSuite (used by every component's REST wrapper, e.g. plugins/example's
   runExampleTestSuite) only forces componentName and delegates to runTestSuite, this single
   check covers every component's REST endpoint automatically, with zero changes needed to
   any wrapper script or *.rest.xml.
   
   No new entity, admin screen, or service - an admin sets/clears the override through the
   existing generic webtools SystemProperty screen (or an entity XML data import), the same
   way the global flag is already managed.
   
   Tested manually against a running server: default-enabled behavior with no override,
   disabling one component live via a SystemProperty data import, confirming the global flag
   and every other component stay unaffected, and re-enabling live - all without a restart.
   
   A companion PR against ofbiz-plugins updates plugins/example's runExampleTestSuite service
   description to mention this gate (no behavior change - it already inherited the gate
   automatically).
   
   Thanks:
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ofbiz.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Implemented: per-component override of test.api.enabled REST test-run API [ofbiz-framework]

Posted by "ashishvijaywargiya (via GitHub)" <gi...@apache.org>.
ashishvijaywargiya merged PR #1698:
URL: https://github.com/apache/ofbiz-framework/pull/1698


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ofbiz.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org