Commit 9c771902 authored by Adam Bergstein's avatar Adam Bergstein
Browse files

Issue #3307161 by nerdstein: Fix phpunit tests - 8/31/2022

parent 067a05f2
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ final class MockedHttpMiddleware {
          );
        }

        if ($uri === 'https://api.tugboat.qa/v3/repos/kerneltestrepo/previews') {
        if ($uri === 'https://api.tugboatqa.com/v3/repos/kerneltestrepo/previews') {
          $this->state->set($uri, (string) $request->getBody());
          return new FulfilledPromise(
            new Response(200, [], Json::encode([
@@ -48,11 +48,11 @@ final class MockedHttpMiddleware {
            ]))
          );
        }
        if ($uri === 'https://api.tugboat.qa/v3/previews' && $request->getMethod() === 'POST') {
        if ($uri === 'https://api.tugboatqa.com/v3/previews' && $request->getMethod() === 'POST') {
          $this->state->set($uri, Json::decode((string) $request->getBody()));
          return new FulfilledPromise(
            new Response(200, [
              'Content-Location' => 'https://api.tugboat.qa/v3/previews/abc123'
              'Content-Location' => 'https://api.tugboatqa.com/v3/previews/abc123'
            ], Json::encode([
              'preview' => 'abc123',
              'job' => 'ac123',
+1 −1
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ final class PreviewConfigGenerator {
      $one_click_demo->getInstallingCommands($parameters),
      [
        'chown -R www-data:www-data "${DOCROOT}"/sites/default/files',
        'echo "SIMPLYEST_STAGE_FINALIZE"'
        'echo "SIMPLYEST_STAGE_FINALIZE"',
      ],
    ];

+2 −4
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ final class InstanceManagerTest extends KernelTestBase {
    ];
    $sut->launchInstance($data);

    $payload = $this->container->get('state')->get('https://api.tugboat.qa/v3/previews');
    $payload = $this->container->get('state')->get('https://api.tugboatqa.com/v3/previews');

    $expected = [
      'ref' => 'master',
@@ -115,14 +115,11 @@ final class InstanceManagerTest extends KernelTestBase {
                'cd stm && composer require --no-update drush/drush',
                'ln -snf "${TUGBOAT_ROOT}/stm/web" "${DOCROOT}"',
                'echo "SIMPLYEST_STAGE_DOWNLOAD"',
                'composer global require szeidler/composer-patches-cli:~1.0',
                'cd stm && composer require cweagans/composer-patches:~1.0 --no-update',
                'cd stm && composer require drupal/token:1.9 --no-update',
                'cd stm && composer require drupal/pathauto:1.8 --no-update',
                'cd stm && composer require drupal/bootstrap:3.24 --no-update',
                'cd stm && composer update --no-ansi',
                'echo "SIMPLYEST_STAGE_PATCHING"',
                'cd stm && composer update --no-ansi',
                'echo "SIMPLYEST_STAGE_INSTALLING"',
                'cd "${DOCROOT}" && ../vendor/bin/drush si umami --db-url=mysql://tugboat:tugboat@mysql:3306/tugboat --account-name=admin --account-pass=admin -y',
                'cd "${DOCROOT}" && ../vendor/bin/drush en token -y',
@@ -133,6 +130,7 @@ final class InstanceManagerTest extends KernelTestBase {
                'mkdir -p ${DOCROOT}/sites/default/files',
                'mkdir -p ${DOCROOT}/sites/default/files/private',
                'chown -R www-data:www-data ${DOCROOT}/sites/default',
                'echo "max_allowed_packet=33554432" >> /etc/my.cnf',
                'echo "SIMPLYEST_STAGE_FINALIZE"',
              ],
            ],
+1 −3
Original line number Diff line number Diff line
@@ -52,12 +52,9 @@ final class Drupal10ConfigTest extends TugboatConfigTestBase {
              'cd stm && composer require --no-update drush/drush',
              'ln -snf "${TUGBOAT_ROOT}/stm/web" "${DOCROOT}"',
              'echo "SIMPLYEST_STAGE_DOWNLOAD"',
              'composer global require szeidler/composer-patches-cli:~1.0',
              'cd stm && composer require cweagans/composer-patches:~1.0 --no-update',
              'cd stm && composer require drupal/token:1.x-dev --no-update',
              'cd stm && composer update --no-ansi',
              'echo "SIMPLYEST_STAGE_PATCHING"',
              'cd stm && composer update --no-ansi',
              'echo "SIMPLYEST_STAGE_INSTALLING"',
              'cd "${DOCROOT}" && ../vendor/bin/drush si standard --db-url=mysql://tugboat:tugboat@mysql:3306/tugboat --account-name=admin --account-pass=admin -y',
              'cd "${DOCROOT}" && ../vendor/bin/drush en token -y',
@@ -65,6 +62,7 @@ final class Drupal10ConfigTest extends TugboatConfigTestBase {
              'mkdir -p ${DOCROOT}/sites/default/files',
              'mkdir -p ${DOCROOT}/sites/default/files/private',
              'chown -R www-data:www-data ${DOCROOT}/sites/default',
              'echo "max_allowed_packet=33554432" >> /etc/my.cnf',
              'echo "SIMPLYEST_STAGE_FINALIZE"',
            ],
          ],
+6 −1
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ final class Drupal7ConfigTest extends TugboatConfigTestBase {
              'mkdir -p ${DOCROOT}/sites/default/files',
              'mkdir -p ${DOCROOT}/sites/default/files/private',
              'chown -R www-data:www-data ${DOCROOT}/sites/default',
              'echo "max_allowed_packet=33554432" >> /etc/my.cnf',
              'echo "SIMPLYEST_STAGE_FINALIZE"',
            ],
          ],
@@ -105,6 +106,7 @@ final class Drupal7ConfigTest extends TugboatConfigTestBase {
              'mkdir -p ${DOCROOT}/sites/default/files',
              'mkdir -p ${DOCROOT}/sites/default/files/private',
              'chown -R www-data:www-data ${DOCROOT}/sites/default',
              'echo "max_allowed_packet=33554432" >> /etc/my.cnf',
              'echo "SIMPLYEST_STAGE_FINALIZE"',
            ],
          ],
@@ -151,6 +153,7 @@ final class Drupal7ConfigTest extends TugboatConfigTestBase {
              'mkdir -p ${DOCROOT}/sites/default/files',
              'mkdir -p ${DOCROOT}/sites/default/files/private',
              'chown -R www-data:www-data ${DOCROOT}/sites/default',
              'echo "max_allowed_packet=33554432" >> /etc/my.cnf',
              'echo "SIMPLYEST_STAGE_FINALIZE"',
            ],
          ],
@@ -191,7 +194,6 @@ final class Drupal7ConfigTest extends TugboatConfigTestBase {
              'echo "SIMPLYEST_STAGE_DOWNLOAD"',
              'drush -r "${DOCROOT}" dl token-7.x-1.0 -y',
              'echo "SIMPLYEST_STAGE_PATCHING"',
              'cd "${DOCROOT}" && curl https://www.drupal.org/files/issues/2019-12-19/3077423-11.patch | patch -p1',
              'echo "SIMPLYEST_STAGE_INSTALLING"',
              'cp ${DOCROOT}/sites/default/default.settings.php ${DOCROOT}/sites/default/settings.php',
              'echo "\$databases[\'default\'][\'default\'] = [" >> ${DOCROOT}/sites/default/settings.php',
@@ -208,6 +210,7 @@ final class Drupal7ConfigTest extends TugboatConfigTestBase {
              'mkdir -p ${DOCROOT}/sites/default/files',
              'mkdir -p ${DOCROOT}/sites/default/files/private',
              'chown -R www-data:www-data ${DOCROOT}/sites/default',
              'echo "max_allowed_packet=33554432" >> /etc/my.cnf',
              'echo "SIMPLYEST_STAGE_FINALIZE"',
            ],
          ],
@@ -258,6 +261,7 @@ final class Drupal7ConfigTest extends TugboatConfigTestBase {
              'mkdir -p ${DOCROOT}/sites/default/files',
              'mkdir -p ${DOCROOT}/sites/default/files/private',
              'chown -R www-data:www-data ${DOCROOT}/sites/default',
              'echo "max_allowed_packet=33554432" >> /etc/my.cnf',
              'echo "SIMPLYEST_STAGE_FINALIZE"',
            ],
          ],
@@ -302,6 +306,7 @@ final class Drupal7ConfigTest extends TugboatConfigTestBase {
              'mkdir -p ${DOCROOT}/sites/default/files',
              'mkdir -p ${DOCROOT}/sites/default/files/private',
              'chown -R www-data:www-data ${DOCROOT}/sites/default',
              'echo "max_allowed_packet=33554432" >> /etc/my.cnf',
              'echo "SIMPLYEST_STAGE_FINALIZE"',
            ],
          ],
Loading