-
Notifications
You must be signed in to change notification settings - Fork 472
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
v0.3.9 semver failing on rpm version format 9.99 but pass for format 9.99.9 #532
Comments
correcting the yml file as it dropped pkg name package: kernel: my-package info where my-package is proprietary package can not share more info |
also looks like -f json is providing oneliner output like -f json_oneline |
As per the semver spec:
https://semver.org/#spec-item-2 I think the feature you want is requested in this PR which is still open: #435 See my comment here where I explain why using semver for rpm matching can give incorrect results: Please let me know if the goss manual needs to be re-worded to clarify this further. RPM version matching/ranges is something I would like to support in the future, but it does not currently exist in goss. If this feature is important to you add a 👍 to the first comment in #435 Thanks for using goss and providing feedback! |
Regarding JSON, json_oneliner will be deprecated. See the second bullet on the release notes:
|
Thank you for reply , I am new to goss still learning but honesty I am lost when to use semver matcher as the example in the manual is not very clear.. this is good tool but manual lacks example in some advanced area like matching without template and now semver .. |
can you give some real life example than this ? not sure what "example:" means in the example. |
If you have a package that adheres to strict semver format I comment on how |
Closing, since semver-matcher is working as intended and 9.99 isn't semver. |
Describe the bug
new semver version match if match is format 9.99 it fails but if format is 9.99.9 passes
How To Reproduce
package:
:
installed: true
versions:
and:
- have-len: 1
- contain-element:
semver-constraint: ">=1.10"
kernel:
installed: true
versions:
and:
- have-len: 1
- contain-element:
semver-constraint: ">=3.10.0"
mypkg info
-bash-4.2$ rpm -qa --info
Name :
Version : 1.11
Release : 1.lrh7
Expected Behavior
expect package to pass
Actual Behavior
-bash-4.2$ /usr/local/bin/goss -g package-version.yaml validate -f tap
1..4
ok 1 - Package: : installed: matches expectation: [true]
not ok 2 - : version: Error: Expected a valid semver constraint. Got:
: >=1.10
ok 3 - Package: kernel: installed: matches expectation: [true]
ok 4 - Package: kernel: version: matches expectation: []
Environment:
The text was updated successfully, but these errors were encountered: