Migrate unit tests from Azure.Functions.Cli.Tests to Func.Unit.Tests#4480
Merged
liliankasem merged 7 commits intomainfrom Jul 9, 2025
Merged
Migrate unit tests from Azure.Functions.Cli.Tests to Func.Unit.Tests#4480liliankasem merged 7 commits intomainfrom
liliankasem merged 7 commits intomainfrom
Conversation
Copilot
AI
changed the title
[WIP] Migrate unit tests
Migrate unit tests from Azure.Functions.Cli.Tests to Func.Unit.Tests
Jun 18, 2025
Member
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Co-authored-by: liliankasem <2198905+liliankasem@users.noreply.github.com>
…aining unit tests Co-authored-by: liliankasem <2198905+liliankasem@users.noreply.github.com>
Co-authored-by: liliankasem <2198905+liliankasem@users.noreply.github.com>
6888b1f to
70f8eac
Compare
Member
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
aishwaryabh
approved these changes
Jul 8, 2025
satvu
approved these changes
Jul 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR migrates pure unit tests from the
test/Azure.Functions.Cli.Testsproject to the dedicatedtest/Cli/Func.Unit.Testsproject. The goal is to separate unit tests (which test individual components in isolation) from integration/E2E tests (which use CliTester or run the full CLI).Changes Made
Migrated Unit Tests (20 files total)
TestUtils.cs,Extensions.csKubernetesHelperUnitTests.cs- Kubernetes name validation and YAML serializationUtilitiesTests.cs- Configuration and logging utility methodsAzureHelperTests.cs- Azure function key retrieval (with mocked HTTP)RequirementsTxtParserTests.cs- Python requirements.txt parsing logicGitIgnoreParserTests.cs- Git ignore pattern matchingCommandCheckerFacts.cs- Command existence validationColoredConsoleLoggerTests.cs- Console logging functionalityLoggingFilterHelperTests.cs- Log filtering logicKedaHelperUnitTests.cs- KEDA metadata population for v1/v2HostHelperTests.cs- Custom handler executable detectionStringExtensionsTests.cs- String sanitization methodsUriExtensionsTests.cs- URI server status checkingTaskExtensionsTests.cs- Task failure handling extensionsGenericExtensionsTests.cs- Generic object merging extensionsProcessExtensionsTests.cs- Process wait extensionsResolveActionTests.cs- Command line argument parsing and action resolutionProject Updates
Azure.Functions.Cli.Unit.Tests.csprojwith required NuGet package references:Newtonsoft.Json,NSubstitute,RichardSzalay.MockHttp,SuaveServerWrapper,Xunit.SkippableFactAzure.Functions.Cli.Unit.TestsnamespaceVerification
The remaining tests in
Azure.Functions.Cli.Testsare primarily E2E tests that use CliTester or require running the full CLI, which is appropriate for that project.Fixes #4474.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
azfunc.pkgs.visualstudio.comdotnet build --verbosity quiet(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.