-
Notifications
You must be signed in to change notification settings - Fork 19
fix: no json connectedStatus on skipconnection #27
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
Conversation
| if (flags.skipconnectionstatus) { | ||
| fields.connectedStatus = fields.connectedStatus ?? 'Unknown'; | ||
| } else { | ||
| if (!flags.skipconnectionstatus) { |
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.
@mshanemc is there a test to cover this?
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.
plugin-org/test/shared/orgListUtil.test.ts
Line 112 in c53fba1
| it('skipconnectionstatus', async () => { |
the command is just passing that flag to orgListUtil so the test is at that level instead of on the command.
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.
@mshanemc that test verifies what happens when skipconnectionstatus is true. Is there an existing test that verifies results when it is false?
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.
Another way to put it, is there a way this bug could have been caught with a test?
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.
that test now asserts that --skipconnectionstatus produces nonScratchOrgs with no connectedStatus in the json
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.
@mshanemc Does the test below represent verification of the correct behavior when flags.skipconnectionstatus is false?
plugin-org/test/shared/orgListUtil.test.ts
Line 102 in de91ff5
| it('readLocallyValidatedMetaConfigsGroupedByOrgType', async () => { |
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.
when migrating this command, I tried to keep the tests on orgListUtil as close to the original as possible.
I don't like the original either, so I'm gonna fix them.
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.
better?
peternhale
left a comment
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.
Thank you!
Codecov Report
@@ Coverage Diff @@
## main #27 +/- ##
=======================================
Coverage ? 83.21%
=======================================
Files ? 6
Lines ? 292
Branches ? 42
=======================================
Hits ? 243
Misses ? 35
Partials ? 14 Continue to review full report at Codecov.
|
What does this PR do?
toolbelt:
--json --skipconnectionstatuswould have no property for connectedStatus on non-scratch orgsplugin: set the connectedStatus to 'Unknown'
This change fixes that.
We also never update isDevHub, and a viable customer scenario is using a prod org for CLI work (ex w/ sandboxes) and then turning on DevHub to get scratch orgs. Now
org:listre-checks on the server. forcedotcom/cli#482h/t @SCWells72 for all the help
What issues does this PR fix or reference?
@W-8871284@
@W-8881661@ forcedotcom/cli#482