Skip to content

Add L0 tests for AzureFunctionAppV1 and AzureFunctionAppV2#22125

Open
v-abhishera wants to merge 9 commits into
masterfrom
users/v-abhishera/AzureFunctionAppL0TestAdditon
Open

Add L0 tests for AzureFunctionAppV1 and AzureFunctionAppV2#22125
v-abhishera wants to merge 9 commits into
masterfrom
users/v-abhishera/AzureFunctionAppL0TestAdditon

Conversation

@v-abhishera
Copy link
Copy Markdown
Contributor

@v-abhishera v-abhishera commented May 5, 2026

Summary

Adds and improves L0 test coverage for AzureFunctionAppV1 and AzureFunctionAppV2, hardens assertions, and aligns task patch versions.

What changed

  1. Added/updated L0 tests for both tasks
  • Added meaningful DeploymentFactory routing tests that execute real production factory logic.
  • Added/updated TaskParameters MockTestRunner smoke tests.
  1. Strengthened test assertions
  • Replaced weak pass conditions with explicit assertions.
  • Replaced silent conditional logging in TaskParametersL0Tests with assert-based checks.
  • Kept mock-runner validation aligned with expected mock failure behavior while asserting key error signal.
  1. Coverage parity and cleanup
  • Added V2 parity test for unmatched deployment method current behavior.
  • Removed unused setup in L0 tests (temp dir lifecycle).
  • Added comment explaining deferred require usage in DeploymentFactory tests.
  • Removed duplicated env setup and cleaned minor test mock values.
  1. Version updates
  • AzureFunctionAppV1: 1.274.2 -> 1.274.3
  • AzureFunctionAppV2: 2.274.1 -> 2.274.2
  • Updated both task.json and task.loc.json for each task.

Validation

  • Fast build passed for AzureFunctionAppV1 and AzureFunctionAppV2.
  • Fast L0 tests passed:
    • V1: 11 passing
    • V2: 12 passing

Risk

Low. Changes are test-focused plus required task version metadata updates; no production deployment logic changes were introduced.

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 3 pipeline(s).

3 similar comments
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 3 pipeline(s).

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 3 pipeline(s).

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 3 pipeline(s).

@v-abhishera v-abhishera force-pushed the users/v-abhishera/AzureFunctionAppL0TestAdditon branch from e471ec7 to b04b828 Compare May 6, 2026 04:51
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 3 pipeline(s).

@v-abhishera v-abhishera marked this pull request as ready for review May 6, 2026 05:30
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 3 pipeline(s).

…e unnecessary files

- Refactor DeploymentFactoryTests for better clarity and efficiency
- Update L0 tests to ensure proper task parameter validation
- Remove obsolete package.json and package-lock.json files
- Increment patch version in task.json and task.loc.json for AzureFunctionAppV1 and AzureFunctionAppV2
- update V1/V2 DeploymentFactory tests to validate real routing behavior
- add V2 parity test for unmatched deployment method current behavior
- harden L0 smoke assertions for expected mock outcome and error signal
- replace silent TaskParameters checks with assert-based validation
- clean test setup (remove unused tmpDir, dedupe env setup, add deferred-require note, align mock osType)
- bump task versions:
  - AzureFunctionAppV1: 1.274.2 -> 1.274.3
  - AzureFunctionAppV2: 2.274.1 -> 2.274.2
- update task.json/task.loc.json in sync for both tasks
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.

1 participant