-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Refactored test/cmd/authentication.sh to use proper strings and literals #9360
Refactored test/cmd/authentication.sh to use proper strings and literals #9360
Conversation
[test] me |
Weird Bash flake, re[test] |
whoamitoken=$(oc process -f ${OS_ROOT}/test/testdata/authentication/scoped-token-template.yaml TOKEN_PREFIX=whoami SCOPE=user:info USER_NAME="${username}" USER_UID="${useruid}" | oc create -f - -o name | awk -F/ '{print $2}') | ||
os::cmd::expect_success_and_text 'oc get user/~ --token="${whoamitoken}"' "${username}" | ||
os::cmd::expect_failure_and_text 'oc get pods --token="${whoamitoken}" -n cmd-authentication' 'prevent this action; User "scoped-user" cannot list pods in project "cmd-authentication"' | ||
whoamitoken="$(oc process -f "${OS_ROOT}/test/testdata/authentication/scoped-token-template.yaml" TOKEN_PREFIX=whoami SCOPE=user:info USER_NAME="${username}" USER_UID="${useruid}" | oc create -f - -o name | awk -F/ '{print $2}')" |
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.
bash properly handles "$("")"
?
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.
Yes. Everything inside of $()
is interpreted in a 'clean' scope -- as if you opened the subshell and typed it there. $()
is also nestable. Don't get any ideas.
Signed-off-by: Steve Kuznetsov <[email protected]>
84d196e
to
1062689
Compare
[merge] |
[merge] |
hit #8571 again and also AWS failed |
[test] me and hope for good things |
Evaluated for origin test up to 1062689 |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/5892/) |
lgtm, holding on rebase |
[merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/5892/) (Image: devenv-rhel7_4576) |
Evaluated for origin merge up to 1062689 |
@deads2k PTAL and also:
and using Package Manger in Sublime, install
SublimeLInter
andSublimeLinter-shellcheck
.These were functionally correct in the sense that they worked with the nonsense inside of
os::cmd
... but still.