Skip to content

Commit

Permalink
fix: "detected no test modules" error in "foundation test --module"
Browse files Browse the repository at this point in the history
the previous implementation had a bug where setting the --module
flag would subsequently not find the module to invoke
  • Loading branch information
JohannesRudolph committed Mar 27, 2024
1 parent 3f54ea1 commit fded1e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/foundation/PlatformDeployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,13 @@ export class PlatformDeployer<T extends PlatformConfig> {
tenantModules: true,
};

// if we specifiy a single module and not a prefix path, pick a single file
const glob = relativeModulePath.endsWith(".test")
? `${relativeModulePath}/terragrunt.hcl`
: `${relativeModulePath}/${TEST_MODULE_GLOB}/terragrunt.hcl`;

const files = await this.repo.processFilesGlob(
`${relativeModulePath}/${TEST_MODULE_GLOB}/terragrunt.hcl`,
glob,
(file) => file,
excludes,
);
Expand Down

0 comments on commit fded1e8

Please sign in to comment.