Make it possible to skip running TrialAccountProvisioner in the config action when being in test mode
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3569665. --> Reported by: [marcus_johansson](https://www.drupal.org/user/385947) Related to !47 >>> <p>[Tracker]<br> <strong>Update Summary: </strong>[One-line status update for stakeholders]<br> <strong>Check-in Date: </strong>MM/DD/YYYY<br> <strong>Blocked by: </strong>[#XXXXXX] (New issues on new lines)<br> <strong>Additional Collaborators: </strong> @username1, @username2<br> <em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br> [/Tracker]</p> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Set to critical because it is affecting CI in general and Drupal CMS CI in specifics, see: <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/drupal_cms/issues/3569627" title="Status: Closed (fixed)">#3569627: Disable Amazee AI auto-trial provisioning in drupal_cms_ai tests</a></span>.</p> <p>Currently the <code>ensureAmazeeAiAccess</code> config action is being run inside a recipe test like in Drupal CMS CI, it will actually trigger this code and create an account that will never be used and it will slow down the testing process as well or in certain cases even time out.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>This comes from @mxr576 comment in <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/drupal_cms/issues/3569627" title="Status: Closed (fixed)">#3569627: Disable Amazee AI auto-trial provisioning in drupal_cms_ai tests</a></span>:</p> <ul> <li>In the EnsureAmazeeAiAccess, skip running the trialAccountProvisionerFactory create method if the config action is running in test mode.</li> <li>Comment on <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/drupal_cms/issues/3569627" title="Status: Closed (fixed)">#3569627: Disable Amazee AI auto-trial provisioning in drupal_cms_ai tests</a></span> or test it against the <code>drupal_cms_ai</code> recipe when this is testable/done.</li> </ul> <h3 id="summary-ai-usage">AI usage (if applicable)</h3> <p>[ ] AI Assisted Issue<br> This issue was generated with AI assistance, but was reviewed and refined by the creator.</p> <p>[ ] AI Assisted Code<br> This code was mainly generated by a human, with AI autocompleting or parts AI generated, but under full human supervision.</p> <p>[ ] AI Generated Code<br> This code was mainly generated by an AI with human guidance, and reviewed, tested, and refined by a human.</p> <p>[ ] Vibe Coded<br> This code was generated by an AI and has only been functionally tested.</p>
issue