-
Notifications
You must be signed in to change notification settings - Fork 405
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
fix: org create command to sf style #5295
Changes from 7 commits
69c6ecb
db4259e
f4894fe
8d0d80c
a508401
262b528
a0b9de4
60dc3e4
894aaf8
0b76c24
5ec056a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,9 +58,11 @@ export class CommandBuilder { | |
return this; | ||
} | ||
|
||
public withJson(): CommandBuilder { | ||
public withJson(logLevel: boolean = true): CommandBuilder { | ||
this.args.push('--json'); | ||
this.args.push('--loglevel', 'fatal'); | ||
if (logLevel) { | ||
this.args.push('--loglevel', 'fatal'); | ||
} | ||
Comment on lines
60
to
+65
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we are now using the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that flag is still used in other commands, so I'd keep it until the very last moment when we actually change from sfdx to sf or when no other commands are left to be transitioned |
||
return this; | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ import { expect } from 'chai'; | |
import * as path from 'path'; | ||
import * as sinon from 'sinon'; | ||
import * as vscode from 'vscode'; | ||
import { AliasGatherer, ForceOrgCreateExecutor } from '../../../src/commands'; | ||
import { AliasGatherer, OrgCreateExecutor } from '../../../src/commands'; | ||
import { nls } from '../../../src/messages'; | ||
import { workspaceUtils } from '../../../src/util'; | ||
|
||
|
@@ -125,17 +125,17 @@ describe('Force Org Create', () => { | |
const CONFIG_FILE = 'configFile.txt'; | ||
const TEST_ALIAS = 'testAlias'; | ||
const TEST_ORG_EXPIRATION_DAYS = '7'; | ||
const forceOrgCreateBuilder = new ForceOrgCreateExecutor(); | ||
const forceOrgCreateBuilder = new OrgCreateExecutor(); | ||
const createCommand = forceOrgCreateBuilder.build({ | ||
file: path.join(workspaceUtils.getRootWorkspacePath(), CONFIG_FILE), | ||
alias: TEST_ALIAS, | ||
expirationDays: TEST_ORG_EXPIRATION_DAYS | ||
}); | ||
expect(createCommand.toCommand()).to.equal( | ||
`sfdx force:org:create -f ${CONFIG_FILE} --setalias ${TEST_ALIAS} --durationdays ${TEST_ORG_EXPIRATION_DAYS} --setdefaultusername --json --loglevel fatal` | ||
`sfdx org:create:scratch --definition-file ${CONFIG_FILE} --alias ${TEST_ALIAS} --duration-days ${TEST_ORG_EXPIRATION_DAYS} --set-default --json` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This command uses JSON, which is why I'm asking about |
||
); | ||
expect(createCommand.description).to.equal( | ||
nls.localize('force_org_create_default_scratch_org_text') | ||
nls.localize('org_create_default_scratch_org_text') | ||
); | ||
}); | ||
}); | ||
|
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.
Why don't we want JSON anymore?
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.
we want it, the false is just to evaluate the addition of --loglevel