Skip to content

Commit

Permalink
Pass in null for TraceFlag StartDate (#743)
Browse files Browse the repository at this point in the history
@W-5540032@
  • Loading branch information
James Suplizio authored and lcampos committed Nov 13, 2018
1 parent 2705003 commit 3cb73a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,7 @@ export class CreateTraceFlag extends SfdxCommandletExecutor<{}> {
.withFlag(
'--values',
`tracedentityid='${this
.userId}' logtype=developer_log debuglevelid=${developerLogTraceFlag.getDebugLevelId()} StartDate='${developerLogTraceFlag
.getStartDate()
.toUTCString()}' ExpirationDate='${developerLogTraceFlag
.userId}' logtype=developer_log debuglevelid=${developerLogTraceFlag.getDebugLevelId()} StartDate='' ExpirationDate='${developerLogTraceFlag
.getExpirationDate()
.toUTCString()}`
)
Expand Down Expand Up @@ -216,9 +214,7 @@ export class UpdateTraceFlagsExecutor extends SfdxCommandletExecutor<{}> {
.withFlag('--sobjectid', nonNullTraceFlag)
.withFlag(
'--values',
`StartDate='${developerLogTraceFlag
.getStartDate()
.toUTCString()}' ExpirationDate='${developerLogTraceFlag
`StartDate='' ExpirationDate='${developerLogTraceFlag
.getExpirationDate()
.toUTCString()}'`
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('Force Start Apex Debug Logging', () => {
const updateTraceFlagsExecutor = new UpdateTraceFlagsExecutor();
const updateTraceFlagCmd = updateTraceFlagsExecutor.build();
expect(updateTraceFlagCmd.toCommand()).to.equal(
`sfdx force:data:record:update --sobjecttype TraceFlag --sobjectid ${fakeTraceFlagId} --values StartDate='${startDate.toUTCString()}' ExpirationDate='${endDate.toUTCString()}' --usetoolingapi --json --loglevel fatal`
`sfdx force:data:record:update --sobjecttype TraceFlag --sobjectid ${fakeTraceFlagId} --values StartDate='' ExpirationDate='${endDate.toUTCString()}' --usetoolingapi --json --loglevel fatal`
);
});

Expand All @@ -92,7 +92,7 @@ describe('Force Start Apex Debug Logging', () => {
const createTraceFlagExecutor = new CreateTraceFlag('testUserId');
const createTraceFlagCmd = createTraceFlagExecutor.build();
expect(createTraceFlagCmd.toCommand()).to.equal(
`sfdx force:data:record:create --sobjecttype TraceFlag --values tracedentityid='testUserId' logtype=developer_log debuglevelid=${fakeDebugLevelId} StartDate='${startDate.toUTCString()}' ExpirationDate='${endDate.toUTCString()} --usetoolingapi --json --loglevel fatal`
`sfdx force:data:record:create --sobjecttype TraceFlag --values tracedentityid='testUserId' logtype=developer_log debuglevelid=${fakeDebugLevelId} StartDate='' ExpirationDate='${endDate.toUTCString()} --usetoolingapi --json --loglevel fatal`
);
});

Expand Down

0 comments on commit 3cb73a7

Please sign in to comment.