-
Notifications
You must be signed in to change notification settings - Fork 10
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
view-user
: add a new --list-banks
optional argument
#479
base: master
Are you sure you want to change the base?
Conversation
t/t1040-issue478.t
Outdated
test_expect_success 'call view-banks --list-banks' ' | ||
flux account view-user testuser --list-banks > list_banks.out && | ||
grep -E "bankA|bankB|bankC" list_banks.out |
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.
Seems to be a tab v space issue here.
Also, should the test check for all of bankA, bankB, bankC, not any of the three? (Which is I think what this is doing now)
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.
Sorry that I didn't catch this earlier! I usually double check this but it slipped through.
I just force-pushed up a change to also just separate the grep
check into three different checks for all three banks instead of combining all of them on just one line (that was my misunderstanding of the -E
option, sorry!). Can you let me know if you are still seeing that weird output behavior when calling view-user --list-banks
? I wasn't able to reproduce that locally (yet) and I tried calling view-user
with every optional argument...
Problem: There is no concise way to view the banks that a user belongs to. Add a --list-banks optional argument to view-user, which will just print the banks that a user belongs to in the flux-accounting database.
Problem: There exists no tests for calling view-user with the --list-banks option. Add some tests.
I force-pushed to catch up after #526, but I'm thinking now that flux-accounting has its own formatter class, perhaps I should hold off on getting this PR landed until I restructure |
Problem
Mentioned in #478, there is no concise way to just view a list of banks that a user belongs to without having to parse through the rest of the accounting information associated with it.
This PR adds a new optional argument to
view-user
called--list-banks
, which just outputs a newline-delimited list of banks that a user belongs to.A basic test file is also added which calls this optional argument. For now, this is just built on top of #477, but I can always make it separate in case this gets reviewed first. :-)
Fixes #478