Files
releases/test/cases/testdata/units/test-parse-units-errors.yaml
Philip Conrad 63e1877c48 linters+testdata: Reformat all yaml testcases for linting. (#6511)
This commit adds a config for yamllint, mass-reformats all of
the existing Yaml testcases to pass linting, and adds a Yaml
linting job to the pull-request Github Actions workflow. A few 
careful exceptions and ignores were added to the linter's
config to allow keeping our existing Yaml files with minimal
reformatting.

Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
2024-01-10 13:16:01 -05:00

87 lines
2.0 KiB
YAML

---
cases:
- data:
modules:
- |
package test
p {
units.parse("")
}
note: units_parse/failure
query: data.test.p = x
want_error_code: eval_builtin_error
want_error: "units.parse: no amount provided"
strict_error: true
- data:
modules:
- |
package test
p {
units.parse("G")
}
note: units_parse/failure
query: data.test.p = x
want_error_code: eval_builtin_error
want_error: "units.parse: no amount provided"
strict_error: true
- data:
modules:
- |
package test
p {
units.parse("foo")
}
note: units_parse/failure
query: data.test.p = x
want_error_code: eval_builtin_error
want_error: "units.parse: no amount provided"
strict_error: true
- data:
modules:
- |
package test
p {
units.parse("0.0.0")
}
note: units_parse/failure
query: data.test.p = x
want_error_code: eval_builtin_error
want_error: "units.parse: could not parse amount to a number"
strict_error: true
- data:
modules:
- |
package test
p {
units.parse(".5.2")
}
note: units_parse/failure
query: data.test.p = x
want_error_code: eval_builtin_error
want_error: "units.parse: could not parse amount to a number"
strict_error: true
- data:
modules:
- |
package test
p {
units.parse("100 k")
}
note: units_parse/failure
query: data.test.p = x
want_error_code: eval_builtin_error
want_error: "units.parse: spaces not allowed in resource strings"
strict_error: true
- data:
modules:
- |
package test
p {
units.parse(" 327Mi ")
}
note: units_parse/failure
query: data.test.p = x
want_error_code: eval_builtin_error
want_error: "units.parse: spaces not allowed in resource strings"
strict_error: true