Add test trait to create randomly named, non-conflicting default target modules

Created on 22 May 2023, about 1 year ago
Updated 23 May 2023, about 1 year ago

Problem/Motivation

As I was writing the test for πŸ“Œ Add test to inform us when TargetModuleInstaller is no longer needed (core bug is fixed) Needs review , it became apparent that the default target module would always be present on the file system if a previous test also did something that would get Config Enforce Devel to initialize and write it to disk, and so any subsequent test would always find the module, even when we expect it to raise an exception, such as in the linked issue. This led me down a rabbit hole where I realized we probably need a reusable test trait (or service?) that can generate a randomly named default target module for a test and then remove it once the test has completed.

Steps to reproduce

See above.

Proposed resolution

Create a test trait or service to automate and abstract this so we can reuse it.

Remaining tasks

Do the thing.

User interface changes

None probably.

API changes

None?

Data model changes

Probably none?

πŸ“Œ Task
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada Ambient.Impact Toronto

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024