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

12987: test toToml int conversion #13012

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CalvinKrist
Copy link
Contributor

What this PR does / why we need it:

Special notes for your reviewer:

If applicable:

  • this PR contains documentation
  • this PR contains unit tests
  • this PR has been tested for backwards compatibility

@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 7, 2024
@pull-request-size pull-request-size bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 7, 2024
@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 7, 2024
// Ensure that toToml processes integers as ints, and not floats
name: "template with toToml processing an integer",
cmd: fmt.Sprintf("template '%s'", "testdata/testcharts/issue-12987"),
golden: "output/issue-12987.txt",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that this test fails

"moby/templates/test5": "",
"moby/templates/test6": "bar = 9\n",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

while this test passes

}, {
tpl: `{{ toToml . }}`,
expect: "bar = 9.0\n",
vars: map[string]float32{"bar": 9.0},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

and this test passes

@robertsirc
Copy link
Contributor

This is failing due to builds not passing. Is it possible you are out of sync with this branch? I will try to build and run it. Also you are missing DCO, that isn't optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants