generated from salesforcecli/plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: more scratch org creation flags
- Loading branch information
Showing
4 changed files
with
61 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
*/ | ||
import * as fs from 'fs'; | ||
import * as path from 'path'; | ||
import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; | ||
import { execCmd, genUniqueString, TestSession } from '@salesforce/cli-plugins-testkit'; | ||
import { assert, expect } from 'chai'; | ||
import { AuthFields, Messages, Global, StateAggregator } from '@salesforce/core'; | ||
import { secretTimeout } from '../../src/commands/org/create/scratch'; | ||
|
@@ -85,6 +85,17 @@ describe('env create scratch NUTs', () => { | |
).jsonOutput?.result; | ||
expect(resp).to.have.all.keys(keys); | ||
}); | ||
it('creates an org from config file with "override" flags ', () => { | ||
const expectedUsername = genUniqueString('%[email protected]'); | ||
const resp = execCmd<ScratchCreateResponse>( | ||
`env:create:scratch -f config/project-scratch-def.json --json --username ${expectedUsername} --description "new one" --name TheOrg --wait 60`, | ||
{ | ||
ensureExitCode: 0, | ||
} | ||
).jsonOutput?.result; | ||
expect(resp).to.have.all.keys(keys); | ||
expect(resp?.username).to.equal(expectedUsername); | ||
}); | ||
it('creates an org with tracking disabled ', async () => { | ||
const resp = execCmd<ScratchCreateResponse>( | ||
'env:create:scratch --edition developer --no-track-source --json --wait 60', | ||
|