-
Notifications
You must be signed in to change notification settings - Fork 5
[Enhancement] Easy checking of CLI output #35
Conversation
@shubham-cmyk you have linter issues |
I am trying to fix this but this is not fixing :
|
How about something like: apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: echo "Hello World"
output:
stdout:
expected: "Hello ?*"
match: Wildcard
stderr:
expected: "Hello World"
match: Equals |
Looks like it would be more extensible 🤷 |
Okay, the Match could be Equal ( strict ) and contains ( just string contains check ) a wildcard (wildcard check could be passed) ..... Or we should keep match to |
I think |
Something like this will not work well: apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: echo "Hello World"
output:
stdout:
expected: "How are you today ?"
match: Wildcard |
So let's push |
Ok, fine. |
Any schema changes just be sure that the initial post in this PR has a full and complete description of what's available. |
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
These below structs are added. ( edited )
Now we could have something like : For only wild-card match.
Strictly the stdout should be equal what I define.
Check whether the the stdout contains the "hello"
|
@shubham-cmyk the changes here do not reflect this: output:
stdout:
expected: "How are you today ?"
match: Wildcard |
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
It would be nice to cover this with tests too 🙏 |
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Added unit_test to cover this function. |
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
@shubham-cmyk please raise an error if background is true and output checks are present |
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Done |
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
What this PR does / why we need it:
This PR would add an declarative way to check the output of the structs.
This types of command could be used now :
Fixes #22