Skip to content

Commit

Permalink
Fix fileMatch for commodore-helm manager
Browse files Browse the repository at this point in the history
We need to anchor the beginning of `fileMatch` commodore-helm regex so
that we don't accidentally match any files in golden tests which match
`class/[^.]+.ya?ml$`.

Unfortunately, writing a test for this is tricky because we're
configuring Renovate internals which we can't easily exercise in our
test cases.
  • Loading branch information
simu committed Jan 30, 2025
1 parent 7955325 commit f728ab8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions src/commodore-helm/__snapshots__/index.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,27 @@ exports[`manager/commodore-helm/index extractAllPackageFiles() extracts new and
]
`;

exports[`manager/commodore-helm/index extractAllPackageFiles() extracts new and old standard Helm dependencies in the same file in the presence of golden tests 1`] = `
[
{
"currentValue": "1.2.3",
"depName": "chart-1",
"groupName": "component-name",
"registryUrls": [
"https://charts.example.com/",
],
},
{
"currentValue": "4.5.6",
"depName": "chart-2",
"groupName": "component-name",
"registryUrls": [
"https://charts2.example.com/",
],
},
]
`;

exports[`manager/commodore-helm/index extractAllPackageFiles() extracts old standard Helm dependencies 1`] = `
[
{
Expand Down
2 changes: 1 addition & 1 deletion src/commodore-helm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface KapitanHelmDependency extends KapitanDependency {

export const defaultConfig = {
// match all class files of the component
fileMatch: ['class/[^.]+.ya?ml$'],
fileMatch: ['^class/[^.]+.ya?ml$'],
};

export const supportedDatasources = [HelmDatasource.id];
Expand Down

0 comments on commit f728ab8

Please sign in to comment.