-
Notifications
You must be signed in to change notification settings - Fork 484
Description
Hello,
Have a requirement when version condition is not met using semver-constraints, how do i print an desired warning message.
Also, is it possible for the goss tool to continue with the rest of the commands after printing the warning.
package:
ngin:
installed: true
versions:
and:
- have-len: 1
- contain-element:
semver-constraint: '>= 1.14.1'
Example: want to print a o/p like
WARNING invalid semver version bad: no major version found
Hello,
I am trying to use the semver-constraint for package check with the below format and it doesn't provide the intended output.
package:
nginx:
installed: true
versions:
and:
-have-len: 1
-contain-element:
semver-constraint: ">=1.14.1"
Error Thrown-
Error: Matcher expected array, got: map[%!t(string=-contain-element):map[%!t(string=matches):map[%!t(string=semver-constraint):%!t(string=>=1.14.1)]] %!t(string=-have-len):%!t(int=1)]
Any suggestion/help on how this condition needs to be handled.
Thanks in Advance!!