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
Issue with trailing spaces #282
Comments
So the first issue that fails even if the expected == actual is working fine up to Hope that helps narrow it down |
You have to use the newly added These replace In case the key is never rendered, Ref: #134 |
Ah rereading the "action" for each of the above, I see the issue now and seems like its working after updating the matcher. But still the failedTemplate doesn't make sense to me! Do you see anything weird there? |
Found the issue! In the helm file the error message had a space in the end. Feel free to close if you don't think thats a good idea! |
I also updated from 0.3.4 to 0.4.1 and have some issues:
I noticed that for some reason, my included template deployment.secretsVolumes in t_deployment.yaml don't see .Values.deployment.fluentBit, while main template could see that. I am sure that is not an issue of my templates, because helm template command works good with my values, helm unittest 0.3.4 also works good. I'm actually don't understand about space that @stavros-k was talking about. I removed all empty lines in test file, but no result |
In my case the error message had a trailing space. In you case is seems that you tried to access .enabled but fluentBit is either |
In my situation:
---
suite: Test configmap
templates:
- "my-service-configmap.yaml"
tests:
- it: should override all values for one of two pods
set:
my-service:
some-property:
base_url: "https://bar.value.domain/" # sets SERVICE_BASE_URL in the configmap
asserts:
- equal:
path: data.SERVICE_BASE_URL
value: "https://bar.value.domain/"
documentIndex: 0
my-service:
some-property:
base_url: https://foo.value.domain:443
|
@camalot This looks like a problem with the "my-service-configmap.yaml" template itself not the unit test, the property is not actually overriding the base url |
@tewfik-ghariani that implies that the tests prior to using Also, in the multiple regions that I also only gave a single example from this one chart that had failing tests. Every test in this chart is failing. We did not run against our other charts. We just pinned to use I can run against a chart with the new version and get more details. The example that i gave was pretty redacted to remove anything specific to the organization. |
Can you share a minimal reproduction folder containing files that can actually reproduce it? I used all versions since 0.3.0 against 1200unit tests and didn't have a single test fail (apart from 3-4 mentioned in this issue, that was actually my error), on a what I believe a complex library chart. |
I think there is something with the tests and/or the chart itself... I am trying to figure out what the team was trying to test, and the expectation. I am acting more a middle man here. The part that does scare me though is the fact that the tests pass as "expected" on 0.3.6, but fail on 0.4.x. Once I determine what is happening fully with this chart and the tests I will try to create a reproduction folder for it. |
btw |
One of the weird failures is this one:
EDIT: Look at the bottom first
(TLDR, only issue is when a fail message is printed with a trailing space and test suite does not have that trailing space, test will fail, but you can't really see the reason, see the first test below)
Suggestion: TrimSpace on both fail message and expected message
Every other test failure is regarding
isNull
check, egCloning https://github.com/truecharts/library-charts and running
run_common_tests.sh
should have all tests passing.If there is any additional info that you need, please let me know
The text was updated successfully, but these errors were encountered: