Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tests for helm utils #987

Closed
wants to merge 1 commit into from

Conversation

nitishkumar71
Copy link
Contributor

Description

Add tests for helm utils

Motivation and Context

How Has This Been Tested?

If updating or adding a new CLI to arkade get, run:

go build && ./hack/test-tool.sh TOOL_NAME

NA. As it's logic tests included , so nothing additional tests are needed to be done.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Documentation

  • I have updated the list of tools in README.md if (required) with ./arkade get --format markdown
  • I have updated the list of apps in README.md if (required) with ./arkade install --help

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have tested this on arm, or have added code to prevent deployment

want: ValuesMap{},
},
{
name: "invalid yaml file",
Copy link
Owner

Choose a reason for hiding this comment

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

What's invalid about this YAML file, perhaps the test case name could say?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

replicaCount: 1
image:
repository: nginx

not properly indented.

Copy link
Owner

Choose a reason for hiding this comment

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

That looks like properly indented YAML to me?

But it sounds like you've come up with a great name for the test case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

shouldn't valid yaml will look like below? There is no proper indentation.

replicaCount: 1
  image:
repository: nginx

}{
{
name: "valid yaml file",
content: `
Copy link
Owner

Choose a reason for hiding this comment

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

There should also be a test for when image: is at the top level of the file for things like inlets-operator.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated content with a top level image key.

Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
@nitishkumar71 nitishkumar71 deleted the helm_unit_test branch March 16, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add e2e test for helm utils
2 participants