Skip to content

backend: Tests: Add regression test for ApplyMeDefaults trimming#5699

Open
nikunjkumar05 wants to merge 1 commit into
kubernetes-sigs:mainfrom
nikunjkumar05:add-tests
Open

backend: Tests: Add regression test for ApplyMeDefaults trimming#5699
nikunjkumar05 wants to merge 1 commit into
kubernetes-sigs:mainfrom
nikunjkumar05:add-tests

Conversation

@nikunjkumar05
Copy link
Copy Markdown

Summary

Adds one small regression test for ApplyMeDefaults to confirm it trims surrounding whitespace and returns the expected values.

Related Issue

NA

Changes

  • Added TestApplyMeDefaults_TrimsWhitespace in config_test.go

Steps to Test

cd backend
go test ./pkg/config -run TestApplyMeDefaults_TrimsWhitespace -v

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nikunjkumar05
Once this PR has been reviewed and has the lgtm label, please assign illume for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested a review from illume May 16, 2026 17:00
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 16, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: nikunjkumar05 / name: nikunjkumar05 (85dfda5)

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @nikunjkumar05!

It looks like this is your first PR to kubernetes-sigs/headlamp 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/headlamp has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot requested a review from skoeva May 16, 2026 17:00
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels May 16, 2026
@vikash7485
Copy link
Copy Markdown

@nikunjkumar05 , the CLA check is failing because the Contributor License Agreement hasn’t been signed yet. Please open the authorization/agreement link provided by EasyCLA and complete the signing process. Once done, the CLA check should pass automatically.

@nikunjkumar05
Copy link
Copy Markdown
Author

@nikunjkumar05 , the CLA check is failing because the Contributor License Agreement hasn’t been signed yet. Please open the authorization/agreement link provided by EasyCLA and complete the signing process. Once done, the CLA check should pass automatically.

Oh Thanks

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels May 16, 2026
@illume illume requested a review from Copilot May 17, 2026 06:36
Copy link
Copy Markdown
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

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

Thanks for working on this.

The commit messages could use some tidying up to match our contribution guidelines. We use Linux kernel style — the contributing guide has the details, and git log shows good examples.

Commits that need attention
  • backend: add a simple ApplyMeDefaults testcase — Description must start with a capital letter — e.g. frontend: HomeButton: Fix the button not frontend: HomeButton: fix the button.
Commit guidelines
  • Use atomic commits focused on a single change.
  • Use the title format <area>: <Description of changes> — description must start with a capital letter.
  • Keep the title under 72 characters (soft requirement).
  • Explain the intention and why the change is needed.
  • Make commit titles meaningful and describe what changed.
  • Do not add code that a later commit rewrites; squash or reorder commits instead.
  • Do not include Fixes #NN in commit messages.

Good examples:

  • frontend: HomeButton: Fix so it navigates to home
  • backend: config: Add enable-dynamic-clusters flag

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a single regression unit test verifying that ApplyMeDefaults trims surrounding whitespace from each of its four inputs and returns the trimmed values unchanged when they are non-empty.

Changes:

  • New test TestApplyMeDefaults_TrimsWhitespace in backend/pkg/config/config_test.go covering whitespace trimming on all four arguments.

@nikunjkumar05 nikunjkumar05 changed the title backend: add a simple ApplyMeDefaults testcase backend: Add a simple ApplyMeDefaults testcase May 17, 2026
@nikunjkumar05 nikunjkumar05 changed the title backend: Add a simple ApplyMeDefaults testcase backend: tests: Add a simple ApplyMeDefaults testcase May 17, 2026
@nikunjkumar05 nikunjkumar05 changed the title backend: tests: Add a simple ApplyMeDefaults testcase backend: tests: Add regression test for ApplyMeDefaults trimming May 17, 2026
@nikunjkumar05
Copy link
Copy Markdown
Author

nikunjkumar05 commented May 17, 2026

Thanks I'll will take care of it

@nikunjkumar05 nikunjkumar05 changed the title backend: tests: Add regression test for ApplyMeDefaults trimming backend: Tests: Add regression test for ApplyMeDefaults trimming May 17, 2026
@nikunjkumar05 nikunjkumar05 requested a review from illume May 18, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants