-
Notifications
You must be signed in to change notification settings - Fork 143
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
Raise error if malformed test metadata is given #1905
Conversation
With the patch, the test result looks like: $ cat main.fmf
summary: Concise summary describing what the test does
test: false
framework: beakerlib
$ tmt run -avvv provision -h local
/var/tmp/tmt/run-001
Found 1 plan.
/plans/foo
summary: Basic smoke test
discover
how: fmf
order: 50
directory: /home/huanli/dev/1881/foo
warn: /tests/foo:test - False is not of type 'string'
finish
prune: Prune plan workdir '/var/tmp/tmt/run-001/plans/foo'.
summary: 0 tasks completed
Oops, False is not of type 'string'. Hi @lukaszachy and @happz, please help to review, thanks! |
bd7c961
to
d7088d2
Compare
Hi @happz, with your PR #1869,
I don't know how to check |
d7088d2
to
254bb5e
Compare
lambdas are a bit too clumsy in Python, once there are more than just a few actions to take. How about adding |
Hi @happz, function $ cat main.fmf
summary: Concise summary describing what the test does
test: false
framework: beakerlib
$ tmt run -avvv provision -h local
/var/tmp/tmt/run-056
Found 1 plan.
/plans/foo
summary: Basic smoke test
discover
how: fmf
order: 50
directory: /home/huanli/dev/1881/foo
warn: /tests/foo:test - False is not of type 'string'
finish
Prune '/plans/foo' plan workdir '/var/tmp/tmt/run-056/plans/foo'.
summary: 0 tasks completed
Field '/tests/foo:test' must be a string, 'bool' found. Please help to review again, thanks! |
3cb51c7
to
3bba56c
Compare
95a2837
to
5e047e4
Compare
Hi @happz and @lukaszachy , a simple test is added, please help to review, thanks! |
5e047e4
to
7a16e89
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
If a malformed test metadata is given by user, e.g. test: false an error should be raised because the type of the test metadata is not string. Then user can fix it accordingly. Signed-off-by: Vector Li <[email protected]>
2196fdf
to
ffdd6a1
Compare
The failing test is irrelevant, known issue #2063. |
Fix: #1881