Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Xiaohua Guan created an issue. See original summary.

Xiaohua Guan’s picture

Xiaohua Guan’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: 3013528_20181114.patch, failed testing. View results

Xiaohua Guan’s picture

Xiaohua Guan’s picture

Xiaohua Guan’s picture

Xiaohua Guan’s picture

Xiaohua Guan’s picture

Xiaohua Guan’s picture

Status: Needs work » Needs review

Errors like below occurred.

1) Drupal\Tests\aws_cloud\Functional\Ec2\SnapshotTest::testSnapshot
Exception: Error: Class 'Aws\Ec2\Ec2Client' not found
Drupal\aws_cloud\Service\AwsEc2Service->getEc2Client()() (Line: 144)
Xiaohua Guan’s picture

I added a composer.json file, where add the dependency to package aws-sdk-php.

In addition, I remove useless files *.test

Status: Needs review » Needs work

The last submitted patch, 8: 3013528_20181114_3.patch, failed testing. View results

Xiaohua Guan’s picture

Xiaohua Guan’s picture

Xiaohua Guan’s picture

Xiaohua Guan’s picture

Xiaohua Guan’s picture

Status: Needs work » Needs review

Because the destination parameter is used in test case, the following errors occurred.

1) Drupal\Tests\aws_cloud\Functional\Ec2\ElasticIpTest::testElasticIp
Exception: User error: Redirects to external URLs are not allowed by default, use \Drupal\Core\Routing\TrustedRedirectResponse for it.
Drupal\Core\EventSubscriber\RedirectResponseSubscriber->checkRedirectUrl()() (Line: 84)

I removed the destination parameter, and changed redirect URL of XXXDeleteForm as below.

OLD:

$form_state->setRedirectUrl($this->getCancelUrl());

NEW:

    $form_state->setRedirect('view.aws_elastic_ip.page_1', ['cloud_context' => $entity->cloud_context()]);
Xiaohua Guan’s picture

Xiaohua Guan’s picture

Xiaohua Guan’s picture

@yas

Please review the patch file 3013528_20181115_2.patch.

yas’s picture

Status: Needs review » Reviewed & tested by the community

@xiaohua-guan Great work, it is working now!

  • yas committed c9f6aa8 on 8.x-1.x authored by Xiaohua Guan
    Issue #3013528 by Xiaohua Guan, yas: Fix errors in automated testing
    
yas’s picture

Status: Reviewed & tested by the community » Fixed

I pushed the patch. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

yas’s picture

Title: Fix errors in automated testing. » Fix errors in automated testing