Skip to content
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

Merged
merged 1 commit into from
Jul 12, 2016

Conversation

stevekuznetsov
Copy link
Contributor

@deads2k PTAL and also:

$ sudo dnf install -y ShellCheck

and using Package Manger in Sublime, install SublimeLInter and SublimeLinter-shellcheck.

These were functionally correct in the sense that they worked with the nonsense inside of os::cmd... but still.

@stevekuznetsov
Copy link
Contributor Author

[test] me

@stevekuznetsov
Copy link
Contributor Author

stevekuznetsov commented Jun 16, 2016

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}')"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bash properly handles "$("")" ?

Copy link
Contributor Author

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.

@deads2k
Copy link
Contributor

deads2k commented Jun 16, 2016

[merge]

@stevekuznetsov
Copy link
Contributor Author

conformance flake on #9364 ... @deads2k please re-tag

@deads2k
Copy link
Contributor

deads2k commented Jun 21, 2016

[merge]

@stevekuznetsov
Copy link
Contributor Author

hit #8571 again and also AWS failed

@stevekuznetsov
Copy link
Contributor Author

[test] me and hope for good things

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 1062689

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/5892/)

@deads2k
Copy link
Contributor

deads2k commented Jul 7, 2016

lgtm, holding on rebase

@deads2k deads2k added lgtm Indicates that a PR is ready to be merged. kind/post-rebase labels Jul 7, 2016
@deads2k deads2k self-assigned this Jul 7, 2016
@danmcp
Copy link

danmcp commented Jul 12, 2016

[merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Jul 12, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/5892/) (Image: devenv-rhel7_4576)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 1062689

@openshift-bot openshift-bot merged commit af9df3e into openshift:master Jul 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/post-rebase lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants