Add integration tests for the CLI
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3556500. --> Reported by: [mglaman](https://www.drupal.org/user/2416470) Related to !301 >>> <h3 id="overview">Overview</h3> <p>We have unit tests for the CLI using a mocked server. Alongside this, we should have tests that communicate with a running Drupal site and the simple_oauth module to proper test access token expiration and token refresh as well. </p> <p>This isn't intended to be an end-to-end test which actually calls the CLI against the site, but allowing use to get test coverage of methods that would be hard to mock. For instance the following have no test coverage</p> <p>- createComponent<br> - getComponent<br> - updateComponent<br> - getGlobalAssetLibrary<br> - updateGlobalAssetLibrary<br> - handleApiError for errors not equal to 404<br> - createApiService</p> <h3 id="proposed-resolution">Proposed resolution</h3> <p>CLI Test job should run a Drupal site with Canvas OAuth configured for tests to interact with</p> <h3 id="ui-changes">User interface changes</h3>
issue