etendosoftware / etendo_core

Etendo Classic source code
9 stars 10 forks source link

[EPL-1530] Missing test resource directory configuration for module tests in tests.gradle file #414

Closed valeg-etendo closed 3 months ago

valeg-etendo commented 3 months ago

Error's description

In the core, some adjustments are needed in the Gradle test configuration. In the tests.gradle file, it is necessary to add the sourceSet for the resources used in the tests. This applies to src, modules_core, and modules. The absence of the sourceSet configuration for test resources causes a failure in those tests that expect files to be located in resources. Additionally, it is necessary to add the dependency org.mockito:mockito-core in version 3.2.4 to implement mocks in module tests.

Steps to reproduce the error

  1. Run tests that rely on files located in the resources folder without the sourceSet configuration.
  2. Observe the test failures due to missing resource files.

Required Configurations (if necessary)

  1. Ensure the tests.gradle file lacks the sourceSet configuration for src, modules_core, and modules.
  2. Attempt to implement mocks without the org.mockito:mockito-core dependency.

Expected behavior

Tests should be able to locate and utilize resource files from the resources folder, and mocks should be implementable in module tests without any issues.

Affected Version

¿Latest/Specific? Version number: 24.1.5

Solution Design (optional)

Other test cases

Given: The tests.gradle file includes the sourceSet configuration for resources and the org.mockito:mockito-core dependency is added.

When: Running tests that rely on resource files and mocks.

Then: The tests should pass successfully, utilizing the resource files and mocks as expected.