-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Host E2E Tests #4201
Open
aishwaryabh
wants to merge
74
commits into
main
Choose a base branch
from
aibhandari/custom-host-e2e-tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Custom Host E2E Tests #4201
Changes from 73 commits
Commits
Show all changes
74 commits
Select commit
Hold shift + click to select a range
55f8b79
Core Tools OOP Host (#3802)
aishwaryabh 06abd8a
Custom host changes for VS Scenario (#3831)
aishwaryabh 48e0160
Fix build to remove uploadToStorage (#3839)
aishwaryabh 8e51cb0
Adding artifact assembler tool which consolidates the artifacts and p…
kshyju bf37f55
Updating the artifact name to include "_inproc" suffix (#3849)
kshyju b774dc0
Small refactor and new tests (#3835)
fabiocav 1b49034
Updating coretools to detect unsupported inproc6 sdk scenario (#3825)
surgupta-msft a471fb9
Restructuring custom host to improve error handling (#3861)
mattchenderson ed00ddf
Create Artifacts for releasing OOP core tools (#3848)
aishwaryabh cb9428a
Adding package reference (#3872)
aishwaryabh 2821f48
Templates version update (#3883)
surgupta-msft bc790c6
Create metadata.json file in conslidated artifacts intermediate pipel…
aishwaryabh 48490a7
template update (#4151)
aishwaryabh 0d55b5d
Update templates for dotnet isolated worker 2.x (#4189)
jviau 01502f8
adding tests for custom host
aishwaryabh 5fceed1
removing zipping for now
aishwaryabh c83e950
trying to print out value
aishwaryabh 5d9f276
update artifact assembler
aishwaryabh d9aeb26
removing extra delete file lol
aishwaryabh 6058a5c
adding env variables
aishwaryabh b72b76f
add language
aishwaryabh d0bbf1b
trying to see if this works for e2e tests
aishwaryabh 89cce7a
this should work
aishwaryabh e33cfe4
setting language
aishwaryabh 4c0beb6
trying out new change
aishwaryabh d321529
trying to set env variable
aishwaryabh f81f400
updating start tests
aishwaryabh b789909
setting env variable
aishwaryabh 382e5d9
updating cli tester
aishwaryabh ae308b6
trying to set testVsArtifacts
aishwaryabh 291d2f4
setting paths back to normal
aishwaryabh 11dad61
local settings json parser print current directory
aishwaryabh ec1cd91
adding local.settings.json
aishwaryabh 8cbbe6b
tests should fail now if they actually fail
aishwaryabh bbd5fb9
adding net6 inproc tests
aishwaryabh 6d4c5fd
updating path
aishwaryabh 44820b5
start tests net6 update
aishwaryabh d294ca0
updating zipping to happen
aishwaryabh cdc2632
updating test project
aishwaryabh 78ee1f2
fixing e2e test project
aishwaryabh 5284e1d
add trailing comma and test comment
aishwaryabh ea886d1
updating tests to not exit with expected error
aishwaryabh 3ef34c8
adding tests for custom host
aishwaryabh 21d4bb7
removing zipping for now
aishwaryabh 3d3a5f9
trying to print out value
aishwaryabh 8ce45a2
update artifact assembler
aishwaryabh 3002ea3
removing extra delete file lol
aishwaryabh f31c58f
adding env variables
aishwaryabh 1ce18f6
add language
aishwaryabh e0f10e0
trying to see if this works for e2e tests
aishwaryabh c8c8cc2
this should work
aishwaryabh b144ac4
setting language
aishwaryabh bf63368
trying out new change
aishwaryabh 77e5ca8
trying to set env variable
aishwaryabh 3a94e8e
updating start tests
aishwaryabh 0dec7fd
setting env variable
aishwaryabh c6bffdd
updating cli tester
aishwaryabh 22a5a98
trying to set testVsArtifacts
aishwaryabh c36a121
setting paths back to normal
aishwaryabh edc0cda
local settings json parser print current directory
aishwaryabh 4335061
adding local.settings.json
aishwaryabh e21c72e
tests should fail now if they actually fail
aishwaryabh a1fcb65
adding net6 inproc tests
aishwaryabh 436bc68
updating path
aishwaryabh d8a7ef5
start tests net6 update
aishwaryabh 1207323
updating zipping to happen
aishwaryabh ad23dc6
updating test project
aishwaryabh c2b4527
fixing e2e test project
aishwaryabh 644ad75
add trailing comma and test comment
aishwaryabh e121d76
updating tests to not exit with expected error
aishwaryabh 4ac4fad
merging in latest changes
aishwaryabh a86f93d
updating artifact assembler
aishwaryabh e6dbec8
forgot to update assembler
aishwaryabh 7bb2ac9
changing environment variable back to normal
aishwaryabh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
45 changes: 45 additions & 0 deletions
45
src/Azure.Functions.ArtifactAssembler/PipelineHelpers/testVsArtifacts.ps1
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
param ( | ||
[string]$StagingDirectory | ||
) | ||
|
||
# Set the path to test project (.csproj) and runtime settings | ||
$testProjectPath = "..\..\test\Azure.Functions.Cli.Tests\Azure.Functions.Cli.Tests.csproj" | ||
$runtimeSettings = "..\..\test\Azure.Functions.Cli.Tests\E2E\StartTests_artifact_consolidation_visualstudio.runsettings" | ||
|
||
[System.Environment]::SetEnvironmentVariable("FUNCTIONS_WORKER_RUNTIME", "dotnet", "Process") | ||
|
||
dotnet build $testProjectPath | ||
|
||
# Loop through each subdirectory within the parent directory | ||
Get-ChildItem -Path $StagingDirectory -Directory | ForEach-Object { | ||
$subDir = $_.FullName | ||
Write-Host "name of current file: $subDir" | ||
if ($subDir -like "*win-x*") { | ||
Write-Host "Current directory: $subDir" | ||
# Find func.exe in the subdirectory | ||
$funcExePath = Get-ChildItem -Path $subDir -Filter "func.exe" -ErrorAction SilentlyContinue | ||
|
||
if ($funcExePath) { | ||
$funcExePathFullName = $funcExePath.FullName | ||
Write-Host "Setting FUNC_PATH to: $funcExePathFullName" | ||
|
||
# Set the environment variable FUNC_PATH to the func.exe or func path | ||
[System.Environment]::SetEnvironmentVariable("FUNC_PATH", $funcExePath.FullName, "Process") | ||
|
||
# Run dotnet test with the environment variable set | ||
Write-Host "Running 'dotnet test' on test project: $testProjectPath" | ||
dotnet test $testProjectPath --no-build --settings $runtimeSettings --logger "console;verbosity=detailed" | ||
|
||
if ($LASTEXITCODE -ne 0) { | ||
# If the exit code is non-zero, throw an error | ||
Write-Host "Tests failed with exit code $LASTEXITCODE" | ||
throw "dotnet test failed within $subDir. Exiting with error." | ||
} else { | ||
# If the exit code is zero, tests passed | ||
Write-Host "All tests passed successfully within $subDir" | ||
} | ||
} else { | ||
Write-Host "No func.exe or func found in: $subDir" | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
6 changes: 6 additions & 0 deletions
6
.../Azure.Functions.Cli.Tests/E2E/StartTests_artifact_consolidation_visualstudio.runsettings
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RunSettings> | ||
<RunConfiguration> | ||
<TestCaseFilter>(Group = UseInVisualStudioConsolidatedArtifactGeneration)</TestCaseFilter> | ||
</RunConfiguration> | ||
</RunSettings> |
2 changes: 1 addition & 1 deletion
2
test/Azure.Functions.Cli.Tests/E2E/StartTests_default.runsettings
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RunSettings> | ||
<RunConfiguration> | ||
<TestCaseFilter>(Group != RequiresNestedInProcArtifacts)</TestCaseFilter> | ||
<TestCaseFilter>(Group != RequiresNestedInProcArtifacts AND Group != UseInVisualStudioConsolidatedArtifactGeneration)</TestCaseFilter> | ||
</RunConfiguration> | ||
</RunSettings> |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exitInError does not work when we have to assert the exit error, so I removed this since it was not relevant anymore