-
Notifications
You must be signed in to change notification settings - Fork 80
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
[Fix] run_robot_test.sh - OC login and return value #943
[Fix] run_robot_test.sh - OC login and return value #943
Conversation
Note - regarding the shellcheck, there is also this PR opened #936. |
Robot Results
|
@tarukumar regarding our discussion whether to remove the
So, I guess we want to keep it there? Truth is that looking on the code, it won't stop execution even in case of failure. I can update that. |
a1c01cd
to
62d7ca2
Compare
I added a commit with the check for the |
62d7ca2
to
347e339
Compare
Note: yesterday I was able to test this on a Mac OS machine - these changes should work just fine. Also note - on Mac OS the original code worked just fine, so probably just Linux users are affected with this. Looks like we have more Mac users than Linux users here (what a shame 😄 ). |
347e339
to
61ecc69
Compare
61ecc69
to
4c9f8e4
Compare
4c9f8e4
to
0386012
Compare
0386012
to
5ed70ac
Compare
This fixes OC login on my local Fedora 38 machine. Without this change, the strings contain also `"`. Also missing `-` in front of the switch isn't allowed. Tested with Python based `yq` tool: ``` $ yq --version # https://github.com/kislyuk/yq yq 3.2.3 $ yq --help ... -e set the exit status code based on the output; ... -r output raw strings, not JSON texts; ... ``` and also with GoLang based `yq` tool: ``` $ ./yq_linux_amd64 --version # https://github.com/mikefarah/yq yq (https://github.com/mikefarah/yq/) version v4.35.2 $ ./yq_linux_amd64 --help ... -e, --exit-status set exit status if there are no matches or null or false is returned ... -r, --unwrapScalar unwrap scalar, print the value with no quotes, colors or comments. Defaults to true for yaml (default true) ... ```
Return value in case of service account login could be wrong
5ed70ac
to
0cd5340
Compare
Kudos, SonarCloud Quality Gate passed! |
Rebased. Also created #953. |
…vices#943) * [Fix] run_robot_test.sh - OC login This fixes OC login on my local Fedora 38 machine. Without this change, the strings contain also `"`. Also missing `-` in front of the switch isn't allowed. Tested with Python based `yq` tool: ``` $ yq --version # https://github.com/kislyuk/yq yq 3.2.3 $ yq --help ... -e set the exit status code based on the output; ... -r output raw strings, not JSON texts; ... ``` and also with GoLang based `yq` tool: ``` $ ./yq_linux_amd64 --version # https://github.com/mikefarah/yq yq (https://github.com/mikefarah/yq/) version v4.35.2 $ ./yq_linux_amd64 --help ... -e, --exit-status set exit status if there are no matches or null or false is returned ... -r, --unwrapScalar unwrap scalar, print the value with no quotes, colors or comments. Defaults to true for yaml (default true) ... ``` * [Fix] run_robot_test.sh - fix return value Return value in case of service account login could be wrong * [Fix] run_robot_test.sh - let's check return code of yq before oc login
…vices#943) * [Fix] run_robot_test.sh - OC login This fixes OC login on my local Fedora 38 machine. Without this change, the strings contain also `"`. Also missing `-` in front of the switch isn't allowed. Tested with Python based `yq` tool: ``` $ yq --version # https://github.com/kislyuk/yq yq 3.2.3 $ yq --help ... -e set the exit status code based on the output; ... -r output raw strings, not JSON texts; ... ``` and also with GoLang based `yq` tool: ``` $ ./yq_linux_amd64 --version # https://github.com/mikefarah/yq yq (https://github.com/mikefarah/yq/) version v4.35.2 $ ./yq_linux_amd64 --help ... -e, --exit-status set exit status if there are no matches or null or false is returned ... -r, --unwrapScalar unwrap scalar, print the value with no quotes, colors or comments. Defaults to true for yaml (default true) ... ``` * [Fix] run_robot_test.sh - fix return value Return value in case of service account login could be wrong * [Fix] run_robot_test.sh - let's check return code of yq before oc login
This fixes OC login on my local Fedora 38 machine. Without this change,
the strings contain also
"
.Also missing
-
in front of the switch isn't allowed.Tested with Python based
yq
tool:and also with GoLang based
yq
tool: