-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Upgrade helm-unittest
#414
Comments
I installed the latest verison and gave it a test:
It bailed immediately on
Deleting that one test, it will actual run the rest, but gets a bunch of errors:
|
Ok first issue is @@ -57,55 +57,55 @@ tests:
# So, we use isNotNull instead.
# see: https://github.com/quintush/helm-unittest/issues/122
- isNotNull:
- path: metadata.labels.[app.kubernetes.io/name]
+ path: metadata.labels["app.kubernetes.io/name"]
- isNotNull: |
There also seems to be a bug in |
Fixing the
Seems the logic
This is no longer Either way, having this:
Seems silly as you end up with ugly unset keys hanging around, so changing all instances of that too:
Is cleaner looking, and also means the test once again passes ;) |
Replacing instances of:
Isn't required, but doing so as it seems the old functions are "deprecated" as of https://github.com/helm-unittest/helm-unittest/blob/main/CHANGELOG.md#032--2023-04-17, and the new names better describe their function anyway, and with that all tests pass on
Furthermore, removing the tests impacted by the bug in
So i'll get a PR open now w/ the changes to support |
@cognifloyd See #417 which should resolve this :) |
The primary upstream for
helm-unittest
has moved fromquintush/helm-unittest
tohelm-unittest/helm-unittest
.So, we need to update these lines to refer to the helm-unittest org:
stackstorm-k8s/tests/README.md
Line 7 in ef1ed63
stackstorm-k8s/tests/README.md
Line 14 in ef1ed63
stackstorm-k8s/tests/README.md
Line 25 in ef1ed63
stackstorm-k8s/.github/workflows/unit.yaml
Line 38 in ef1ed63
And then we need to upgrade the version from
v0.2.11
to a newer release. It looks like0.4.4
is the latest as of 11 April 2024.https://github.com/helm-unittest/helm-unittest/releases
There are several features in newer versions that look like they would allow us to simplify some of our tests, or make it possible to actually test things like the init containers. For example, v0.3.0 added jsonpath support. I hope that means we could replace the
documentIndex
with something that looks up the document based on something else, like the resource name. In any case, we should update the version ofhelm-unittest
as much as possible, and then we can refactor the test in follow-up PRs.Related to:
The text was updated successfully, but these errors were encountered: