Support from Acquia helps fund testing for Drupal Acquia logo

Comments

naveenvalecha created an issue. See original summary.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Wim Leers’s picture

Assigned: Unassigned » Wim Leers
Status: Active » Needs review
FileSize
9.12 KB

As one of the maintainers of the REST module, I figured I'd take this one on :)

Status: Needs review » Needs work

The last submitted patch, 3: 2843773-3.patch, failed testing.

Wim Leers’s picture

Status: Needs work » Needs review
FileSize
3.53 KB
9.19 KB
tedbow’s picture

Status: Needs review » Needs work
  1. +++ b/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigResourceTestBase.php
    @@ -0,0 +1,103 @@
    +  /**
    +   * {@inheritdoc}
    +   */
    +  public static $modules = ['dblog'];
    

    Copy and paste error?

  2. +++ b/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigResourceTestBase.php
    @@ -0,0 +1,103 @@
    +  /**
    +   * @var \Drupal\user\RoleInterface
    +   */
    +  protected $entity;
    

    Copy/paste error? Also need description.

  3. +++ b/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigResourceTestBase.php
    @@ -0,0 +1,103 @@
    +      'dependencies' => [
    +        'module' => [
    +          'dblog',
    +          'serialization',
    +          'user',
    +        ],
    

    I don't understand why these expected dependencies pass? dblog? why not REST itself?

Wim Leers’s picture

Status: Needs work » Needs review
FileSize
841 bytes
9.2 KB
  1. No: we're testing with the dblog @RestResource plugin :)
  2. Yes! Thanks :)
  3. This is correct. Explanation:
    • dblog because \Drupal\Tests\rest\Functional\EntityResource\RestResourceConfig\RestResourceConfigResourceTestBase::createEntity() creates a REST resource config entity that uses the dblog @RestResource plugin.
    • serialization because this uses the json serialization format, which is provided by the serialization module
    • user because this uses the cookie authentication mechanism, which is provided by the user module
tedbow’s picture

@Wim Leers ok thanks

That only leaves my question in the last part of #6.3

Why would REST module also not be a dependency. I figure it has something to do with my lack of understanding of configuration management but it seems the config entity type is declared by the REST module so you would need it.

Wim Leers’s picture

I see what you're saying now. I can see why you come to that conclusion, but that's indeed not how the config system works.

The rest_resource_config config entity type is declared by the rest module. Without the rest module, the rest_resource_config entity type simply does not exist. (And then this configuration would simply be ignored: it'd be a meaningless blob of data.)

See for example filter.format.basic_html. It also doesn't list the filter module. Or taxonomy.vocabulary.tags, which also doesn't list the taxonomy module.

tedbow’s picture

Status: Needs review » Reviewed & tested by the community

@Wim Leers ok thanks for the explanation.

RTBC then!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 7: 2843773-7.patch, failed testing.

Anonymous’s picture

Status: Needs work » Reviewed & tested by the community

Nice!) Back to RTBC because a random fail.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 7: 2843773-7.patch, failed testing.

Wim Leers’s picture

Status: Needs work » Reviewed & tested by the community

DrupalCI infra fail.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed c522c8f to 8.4.x and 09787b9 to 8.3.x. Thanks!

Backported to 8.3.x because its tests only.

  • alexpott committed c522c8f on 8.4.x
    Issue #2843773 by Wim Leers: EntityResource: Provide comprehensive test...

  • alexpott committed 09787b9 on 8.3.x
    Issue #2843773 by Wim Leers: EntityResource: Provide comprehensive test...

Status: Fixed » Closed (fixed)

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