Skip to content

test(render): add scenario tests and test infrastructure#82

Merged
dmcilvaney merged 4 commits intomicrosoft:mainfrom
dmcilvaney:damcilva/rendered-spec-output-mock-v2-parts/5_tests
Apr 9, 2026
Merged

test(render): add scenario tests and test infrastructure#82
dmcilvaney merged 4 commits intomicrosoft:mainfrom
dmcilvaney:damcilva/rendered-spec-output-mock-v2-parts/5_tests

Conversation

@dmcilvaney
Copy link
Copy Markdown
Contributor

Add 9 scenario tests for component render:

  • TestRenderSimpleLocalSpec
  • TestRenderWithConfiguredOutputDir (config-provided output dir)
  • TestRenderWithOverlayApplied
  • TestRenderWithPatchSidecar
  • TestRenderStaleCleanup (--force required)
  • TestRenderRefusesOverwriteWithoutForce (safety test)
  • TestRenderSpecWithUndefinedMacros (golang/gometa via mock)
  • TestRenderMultipleComponentsParallel (batch processing)
  • TestRenderBrokenSpecWithGoodSpec (partial failure handling)

Test infrastructure additions:

  • AddFile(): arbitrary file content in test projects
  • WithGitRepo(): git init + commit for synthetic history
  • WithRenderedSpecsDir(): set config rendered-specs-dir
  • initProjectGitRepo(): uses t.Context() for cancellation

Note: Has a hard dependency on #81

Copilot AI review requested due to automatic review settings April 7, 2026 21:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds scenario-level coverage for the new azldev component render workflow (from #81) and extends the scenario test-project builder to support those render scenarios (extra files, configured output dir, and synthetic git history).

Changes:

  • Add 9 new scenario tests covering component render success paths, overlays/sidecars, safety checks, and partial-failure handling.
  • Extend scenario/internal/projecttest dynamic projects with AddFile, WithGitRepo, and WithRenderedSpecsDir options (including git init + initial commit during serialization).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
scenario/internal/projecttest/dynamictestproject.go Adds new dynamic test project options (arbitrary files, git repo init, rendered-specs-dir config).
scenario/component_render_test.go Introduces scenario tests validating azldev component render behavior end-to-end in the container runner.

@dmcilvaney dmcilvaney force-pushed the damcilva/rendered-spec-output-mock-v2-parts/5_tests branch from 1414653 to 3906f8c Compare April 8, 2026 22:39
Copilot AI review requested due to automatic review settings April 8, 2026 23:32
@dmcilvaney dmcilvaney force-pushed the damcilva/rendered-spec-output-mock-v2-parts/5_tests branch from 3906f8c to 82a9c9b Compare April 8, 2026 23:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Add 9 scenario tests for component render:
- TestRenderSimpleLocalSpec
- TestRenderWithConfiguredOutputDir (config-provided output dir)
- TestRenderWithOverlayApplied
- TestRenderWithPatchSidecar
- TestRenderStaleCleanup (--force required)
- TestRenderRefusesOverwriteWithoutForce (safety test)
- TestRenderSpecWithUndefinedMacros (golang/gometa via mock)
- TestRenderMultipleComponentsParallel (batch processing)
- TestRenderBrokenSpecWithGoodSpec (partial failure handling)

Test infrastructure additions:
- AddFile(): arbitrary file content in test projects
- WithGitRepo(): git init + commit for synthetic history
- WithRenderedSpecsDir(): set config rendered-specs-dir
- initProjectGitRepo(): uses t.Context() for cancellation
@dmcilvaney dmcilvaney force-pushed the damcilva/rendered-spec-output-mock-v2-parts/5_tests branch from 82a9c9b to 2d05e39 Compare April 9, 2026 16:46
Copilot AI review requested due to automatic review settings April 9, 2026 18:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@dmcilvaney dmcilvaney marked this pull request as ready for review April 9, 2026 18:58
Copilot AI review requested due to automatic review settings April 9, 2026 18:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

@dmcilvaney dmcilvaney merged commit 8eba605 into microsoft:main Apr 9, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants