Comments

Xiaohua Guan created an issue. See original summary.

xiaohua guan’s picture

StatusFileSize
new6.04 KB
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

StatusFileSize
new12.69 KB
xiaohua guan’s picture

xiaohua guan’s picture

StatusFileSize
new6.65 KB
xiaohua guan’s picture

StatusFileSize
new6.29 KB
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

StatusFileSize
new7.8 KB
xiaohua guan’s picture

xiaohua guan’s picture

StatusFileSize
new20.52 KB
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

StatusFileSize
new14.09 KB
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