Skip to content

Conversation

@antazoey
Copy link
Contributor

  • Limits the columns for TABLE output for list users cmds.

@github-actions
Copy link

github-actions bot commented Apr 23, 2021

CLA Assistant Lite bot All contributors have signed the CLA ✍️

columns = (
["userUid", "status", "username", "orgUid"]
if format == OutputFormat.TABLE
else None
Copy link
Contributor Author

Choose a reason for hiding this comment

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

None means all columns

@timabrmsn
Copy link
Contributor

One unrelated thing I found while testing this change was we don't cleanly handle a bad orgUid. The service returns a 400 we could handle better:

Failure in HTTP call 400 Client Error: Bad Request for url: https://www.crashplan.com/api/User?orgUid=10&pgNum=1&pgSize=500 

response.text: [{"name":"SYSTEM","description":"Organization was not found"}]

assert "modificationDate" in result.output


def test_list_when_table_format_outputs_expected_columns(
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we test the columns we're filtering out aren't in the output?

@antazoey
Copy link
Contributor Author

One unrelated thing I found while testing this change was we don't cleanly handle a bad orgUid. The service returns a 400 we could handle better:

Failure in HTTP call 400 Client Error: Bad Request for url: https://www.crashplan.com/api/User?orgUid=10&pgNum=1&pgSize=500 

response.text: [{"name":"SYSTEM","description":"Organization was not found"}]

Yeah @terimurie also point this out. I was thinking we should just add it to py42 and let it naturally propagate to the CLI

@antazoey antazoey merged commit 4998d02 into master Apr 23, 2021
@antazoey antazoey deleted the users-fixes branch April 23, 2021 19:40
@github-actions github-actions bot locked and limited conversation to collaborators Apr 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants