Skip to content

RunUnitTests.ps1 and RunPesterTests.ps1 are ambiguous script names #1989

@tkol2022

Description

@tkol2022

Prerequisites

  • This issue has an informative and human-readable title.

💡 Summary

The script at the location ./Testing/RunUnitTests.ps1 is ambiguously named. This script is specific to Rego unit tests and should be named accordingly to reduce confusion.

We have a separate script that runs the PowerShell unit tests at location /PowerShell/ScubaGear/Testing/Unit/PowerShell/RunPesterTests.ps1 which is also ambiguous and I recommend that it is renamed also. "PesterTests" is ambiguous since we also use Pester for functional tests.

Motivation and context

Given the amount of file sprawl and deep directory structure inside the ScubaGear folder, it becomes increasingly challenging to unambiguously identify key objects such as testing scripts that developers need. We should strive for script file names that are precise and descriptive of their intended usage.

Implementation notes

  • Change the name from ./Testing/RunUnitTests.ps1 to ./Testing/RunRegoUnitTests.ps1 and update any dependencies
  • Change the name from /PowerShell/ScubaGear/Testing/Unit/PowerShell/RunPesterTests.ps1 to /PowerShell/ScubaGear/Testing/Unit/PowerShell/RunPowerShellUnitTests.ps1

Acceptance criteria

  • Ensure the updates in the implementation notes are complete.
  • Test related workflows in GitHub actions to ensure that nothing broke.

Metadata

Metadata

Assignees

Labels

enhancementThis issue or pull request will add new or improve existing functionality

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions