Fix invalid test dates and redundant step-name prefix in precondition schema errors#240
Conversation
…ma errors Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Code Coverage Report
|
blindzero
left a comment
There was a problem hiding this comment.
@copilot please fix bad tests
Container failed: 1
- /home/runner/work/IdentityLifecycleEngine/IdentityLifecycleEngine/tests/Core/Export-IdlePlan.Tests.ps1
…s generation Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Fixed in 34f5ff4. Three root causes addressed:
|
blindzero
left a comment
There was a problem hiding this comment.
@copilot
please fix the failing 4 pester tests
Running tests from '/home/runner/work/IdentityLifecycleEngine/IdentityLifecycleEngine/tests/Core/Test-IdleWorkflowSchema.Tests.ps1'
Describing Workflow schema validation - Condition/Precondition DSL parity
Error: [-] rejects invalid Condition DSL nodes at definition validation time 10ms (8ms|1ms)
Message
Error: [-] rejects invalid Condition DSL nodes in OnFailureSteps at definition validation time 17ms (16ms|1ms)
Message
Error: [-] rejects invalid Precondition DSL node at definition validation time 5ms (4ms|1ms)
Message
Error: [-] accepts valid precondition using the same condition DSL 4ms (3ms|1ms)
Message…atterns Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Fixed in 30b19a0. Two root causes:
|
683a35d
into
codex/review-preconditions-dsl-for-duplicates
2026-02-30→2026-02-28) in test file (lines 20, 38, 56, 74)Test-IdleWorkflowSchema.ps1line 80 (pass$nullinstead of$StepPath)Export-IdlePlan.Tests.ps1container parse error: addContext 'Planning warnings export'wrapper around orphanedItblockConvertTo-IdleWorkflowStepPreconditionSettings.ps1— avoid PowerShell pipeline unrolling of empty ArrayList by accessing property directly via PSObject/IDictionary instead of throughGet-IdlePropertyValueGet-FirstPropertyValueinConvertTo-IdlePlanExportObject.ps1now handlesIDictionaryobjects (ordered hashtables) in addition to PSCustomObjectsTest-IdleWorkflowSchema.Tests.ps1tests:-likepatterns:[0]→`[0`](PowerShell treats[n]as character class in-like, so*Steps[0].Condition*was never matching the literalSteps[0].Condition)@()for.Countcheck:@($errors).Countinstead of$errors.Count(empty result is$nullwhen pipeline-enumerated;$null.Countthrows withSet-StrictMode -Version Latest)💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.