Right now, the rest entity read/delete tests run on every entity type that it finds.

I think it would be better to limit it to a fixed list of entity types that we want to test. Because it results in unexpected behavior if new entity types are available and the rest tests need to be adjusted for them. They're also slowed down a bit due to that.

The unexpected behavior is limited to config entities provided by the loaded modules, so it's not that bad.

We can still add another entity type explicitly if there's one that is broken and we want to do a regression test.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

klausi’s picture

Status: Active » Needs review
FileSize
1.95 KB

Right, currently the entity_get_info() is really unpredictable as we are adding other entity types like config entities to core.

Let's hardcode this to entity_test, node and user for now.

Status: Needs review » Needs work

The last submitted patch, rest-tests-1847200-1.patch, failed testing.

klausi’s picture

Status: Needs work » Needs review

#1: rest-tests-1847200-1.patch queued for re-testing.

klausi’s picture

FileSize
1.95 KB

Re-uploading patch for testbot.

swentel’s picture

+1 from me, won't push it RTBC yet, let's at least have one more opinion on this.

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me as well.

tim.plunkett’s picture

das-peter’s picture

+1 from me as well. This causes issues with the new test entity types introduced here #1833334: EntityNG: integrate a dynamic property data table handling. RESTTestBase::entityCreate() causes an error because it creates the new test entity types in the fallback case and thus doesn't provide required parameters.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Seems sensible.

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

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