Skip to content

Specs for helmfiles with different names#6105

Closed
jeffwidman wants to merge 2 commits into
mainfrom
add-unit-tests-for-docker-updater-for-helm-charts
Closed

Specs for helmfiles with different names#6105
jeffwidman wants to merge 2 commits into
mainfrom
add-unit-tests-for-docker-updater-for-helm-charts

Conversation

@jeffwidman
Copy link
Copy Markdown
Member

@jeffwidman jeffwidman commented Nov 10, 2022

Unit tests for #6097.

Broke out as a separate PR because I'm still learning the Rspec DSL.

The docker updater for helm charts was hardcoded to `"values.yaml"`.

But we should support the full range of filenames supported in the file
fetcher... for example, in the wild we saw this failing to update
`"arc-values.yaml"` because of this hardcoding.
Dependabot::DependencyFile.new(
content: helmfile_body,
name: "values.yaml"
name: "values.yaml" # TODO not sure if I need to replace the filenames here or if I can override later in a specific test
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to self: this fixture seems to be for all the helm chart tests, so will likely need to refactor things a bit... but no need to fully test that the other filename permutations have exhaustive descriptions as that is the kind of thing that will slow down CI over time... just ensure some basic sanity checking to ensure the updater is picking it up, and then rely on the existing tests to verify that the updater is doing the right thing once it picks it up...

require "dependabot/docker/utils/helpers"
require "spec_helper"

RSpec.describe Dependabot::Docker::Utils.likely_helm_chart? do
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a static method on the class, not sure that this is the proper way to call it? Writing this was a reminder I really need to spend some time on basic ruby syntax tutorials... 😀

Base automatically changed from update-helm-charts-beyond-values.yml to main November 11, 2022 01:55
@github-actions
Copy link
Copy Markdown
Contributor

👋 This pull request has been marked as stale because it has been open for 2 years with no activity. You can comment on the PR to hold stalebot off for a while, or do nothing. If you do nothing, this pull request will be closed eventually by the stalebot. Please see CONTRIBUTING.md for more policy details.

@github-actions github-actions Bot added the Stale label Nov 15, 2024
@github-actions github-actions Bot closed this Nov 23, 2024
@jeffwidman jeffwidman deleted the add-unit-tests-for-docker-updater-for-helm-charts branch April 14, 2025 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant