Test modules should contain the test keyword in their name.

We need to rename these modules:

  • config_override -> config_override_test
  • config_other_module_config -> config_other_module_config_test
  • config_override_test -> config_existing_default_config_test

config_test_invalid_name is removed since it is not ever used.

Files: 
CommentFileSizeAuthor
#17 2225485.17.patch16.33 KBalexpott
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 73,228 pass(es). View
#16 2225485.16.patch17.49 KBalexpott
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 71,165 pass(es). View

Comments

gremy’s picture

Title: Fix test modules namespacing » Fix config test modules namespacing
Issue summary: View changes
gremy’s picture

Assigned: Unassigned » gremy
alexpott’s picture

Issue summary: View changes

There is a config_override_test module already but this is mis-named :)

gremy’s picture

FileSize
15.54 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,806 pass(es). View

Refactored module names and code to match request.

gremy’s picture

Status: Active » Needs review
gremy’s picture

Category: Bug report » Task
jthorson’s picture

Priority: Major » Normal
Status: Needs review » Reviewed & tested by the community

Took a quick look at the patch ... the changes that are there look correct, though admittedly I don't have enough D8 experience to comment on the 'context' of the changes.

I didn't check to ensure that 'all' the instances were captured, but assuming they were, I think it's RTBC.

jthorson’s picture

Gremy ... can you confirm that you've used grep or some other search mechanism to ensure that there are no other instances of the old test names left in the code?

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
FileSize
15.61 KB

The old modules are not removed by the patch in #4

gremy’s picture

Status: Needs work » Needs review
FileSize
15.32 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,861 pass(es). View

jthorson: I can confirm I have searched the entire repository when making the patch.
alexpott: I renamed your patch and rolled it again so that it will go through testing. I do not understand what exactly I am missing from my patch.

alexpott’s picture

Status: Needs review » Needs work
FileSize
53.75 KB

The patch in #10 is still not deleting the files correctly.

gremy’s picture

Status: Needs work » Needs review
FileSize
15.32 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,851 pass(es). View

Thanks alex. Rerolled patch.

gremy’s picture

dawehner’s picture

Status: Needs review » Needs work

We still have unwanted files in there:

.
├── config_events_test
│   ├── config_events_test.info.yml
│   ├── config_events_test.services.yml
│   └── lib
│       └── Drupal
│           └── config_events_test
│               └── EventSubscriber.php
├── config_existing_default_config_test
│   ├── config
│   │   └── system.cron.yml
│   └── config_existing_default_config_test.yml
├── config_integration_test
│   ├── config
│   │   ├── config_integration_test.settings.yml
│   │   ├── config_test.dynamic.config_integration_test.yml
│   │   └── schema
│   │       └── config_integration_test.schema.yml
│   └── config_integration_test.info.yml
├── config_other_module_config
│   ├── config
│   │   └── config_test.dynamic.other_module.yml
│   └── config_other_module_config.info.yml
├── config_other_module_config_test
│   ├── config
│   │   └── config_test.dynamic.other_module_test.yml
│   └── config_other_module_config_test.info.yml
├── config_override
│   ├── config_override.info.yml
│   └── lib
│       └── Drupal
│           └── config_override
│               ├── ConfigOverriderLowPriority.php
│               └── ConfigOverrider.php
├── config_override_test
│   ├── config
│   │   └── system.cron.yml
│   ├── config_override_test.info.yml
│   ├── config_override_test.services.yml
│   ├── config_override_test.yml
│   └── lib
│       └── Drupal
│           └── config_override_test
│               ├── ConfigOverriderLowPriority.php
│               └── ConfigOverrider.php
├── config_test
│   ├── config
│   │   ├── config_test.dynamic.dotted.default.yml
│   │   ├── config_test.noschema.yml
│   │   ├── config_test.no_status.default.yml
│   │   ├── config_test.schema_in_install.yml
│   │   ├── config_test.someschema.somemodule.section_one.subsection.yml
│   │   ├── config_test.someschema.somemodule.section_two.subsection.yml
│   │   ├── config_test.someschema.with_parents.yml
│   │   ├── config_test.someschema.yml
│   │   ├── config_test.system.yml
│   │   ├── config_test.types.yml
│   │   ├── language.config.de.config_test.system.yml
│   │   ├── language.config.en.config_test.system.yml
│   │   ├── language.config.fr.config_test.system.yml
│   │   └── schema
│   │       └── config_test.schema.yml
│   ├── config_test.hooks.inc
│   ├── config_test.info.yml
│   ├── config_test.local_actions.yml
│   ├── config_test.local_tasks.yml
│   ├── config_test.module
│   ├── config_test.routing.yml
│   └── lib
│       └── Drupal
│           └── config_test
│               ├── ConfigTestAccessController.php
│               ├── ConfigTestController.php
│               ├── ConfigTestFormController.php
│               ├── ConfigTestInterface.php
│               ├── ConfigTestListBuilder.php
│               ├── ConfigTestStorage.php
│               ├── Entity
│               │   ├── ConfigQueryTest.php
│               │   └── ConfigTest.php
│               ├── Form
│               │   └── ConfigTestDeleteForm.php
│               ├── TestInstallStorage.php
│               └── TestSchemaStorage.php
├── config_test_invalid_name
│   ├── config
│   │   ├── invalid_object_name.yml
│   │   └── schema
│   │       └── config_test_invalid_name.schema.yml
│   └── config_test_invalid_name.info.yml
└── Drupal
    └── config
        └── Tests
            └── Menu
                └── ConfigLocalTasksTest.php

37 directories, 57 files
+++ b/core/modules/config/tests/config_override_test/lib/Drupal/config_override_test/ConfigOverrider.php
@@ -0,0 +1,41 @@
+        $overrides = $overrides + array('system.site' => array('name' => 'ZOMG overridden site name'));

LOL

xjm’s picture

Use git mv to move the files and directories to their new names/locations. This will simultaneously make the changes on your filesystem and update the git index, so that when you create a patch, the old cruft is deleted. Edit: Note also that if you are diffing in the same branch without a commit, you'll need to use git diff --staged to ensure staged changes are included in the diff.

alexpott’s picture

Assigned: gremy » Unassigned
Status: Needs work » Needs review
Issue tags: +Configuration system
FileSize
17.49 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 71,165 pass(es). View

Rolled patch that moves / removes files as desired.

Patch removes completely invalid config_test_invalid_name test module as it is unused.

alexpott’s picture

FileSize
16.33 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 73,228 pass(es). View

Re-rolled for PSR4

alexpott’s picture

Issue summary: View changes
alexpott’s picture

17: 2225485.17.patch queued for re-testing.

Gábor Hojtsy’s picture

diff --git a/core/modules/config/tests/config_test_invalid_name/config/schema/config_test_invalid_name.schema.yml b/core/modules/config/tests/config_test_invalid_name/config/schema/config_test_invalid_name.schema.yml
deleted file mode 100644

Why is this removed?

alexpott’s picture

Because the test that used it was removed in #2082117: Install default config only when the owner and provider modules are both enabled since the very nature of that test became impossible. You can only install configuration that begins with a currently installed or being installed extension name.

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for discussing this on IRC, so we digged to the bottom of it :) All righto, looks good then.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

  • catch committed cb5263f on 8.x
    Issue #2225485 by alexpott, gremy: Fix config test modules namespacing.
    

Status: Fixed » Closed (fixed)

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