Testing Fixes & Improvements
Pipeline Improvements
- Fixed an issue that was recently introduced into the pipeline (
build.yml
) that was preventing tests in theextra-tests
folder from being deployed/executed, which caused the reported code coverage to drop several percentage points (95% to 91%)- This was caused by recently switching to use
sfdx force:source:push
instead ofsfdx force:source:deploy
- for some reason, theextra-tests
folder was not being pushed to the scratch orgs in the pipeline, so I've reverted back to usingsfdx force:source:deploy
- This was caused by recently switching to use
- Updated
package-lock.json
to fix a dependabot security alert in GitHub - Renamed npm scripts 'lint' to 'scan'
Core Unlocked Package Changes
After resolving the above pipeline issue, I've updated several Apex test classes to cover edge scenarios that the existing tests didn't cover - this also led to fixing a few issues:
- Fixed an issue in
LoggerPlugin
where a runtime error would occur if the specified Apex class for a plugin did not implement the corresponding interface (LoggerPlugin.Batchable
orLoggerPlugin.Triggerable
) - now,LoggerPlugin
gracefully skips any misconfigured plugins/classes. - Updated
LogBatchPurgeController
class to use strongly-typed SObject tokens, instead of hardcoded Strings - Removed some
try-catch
blocks in a few classes where an exception is not expected to occur - Removed an old/deprecated private method,
LogEntryEventBuilder.setTransactionDetails()
- Fixed an incorrect Boolean check in
LoggerEngineDataSelector
that preventedNetwork
data from being properly queried - Fixed #424 - the field
LogEntryEvent__e.RequestId__c
had been incorrectly flagged as a required field, and as reported by @chazwatkins, the value ofSystem.Request.getCurrent().getRequestId()
is null for theautoproc
user (and possibly other scenarios).
Full Changelog: v4.9.7...v4.9.8