Skip to content

Commit

Permalink
skipping dependency isolation test when using sdk artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
Victoria Hall committed Oct 15, 2024
1 parent 54bc3e0 commit 7ba9422
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
20 changes: 19 additions & 1 deletion eng/templates/official/jobs/ci-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,24 @@ jobs:
eng/scripts/test-setup.sh
displayName: 'Install test python extension, dependencies and the worker'
condition: or(eq(variables.isExtensionsRelease, true), eq(variables['USETESTPYTHONEXTENSIONS'], true))
- powershell: |
$pipelineVarSet = "$(USETESTPYTHONSDK)"
Write-Host "pipelineVarSet: $pipelineVarSet"
$branch = "$(Build.SourceBranch)"
Write-Host "Branch: $branch"
if($branch.StartsWith("refs/heads/sdk/") -or $pipelineVarSet -eq "true")
{
Write-Host "##vso[task.setvariable variable=skipDependencyIsolationTests;]true"
}
else
{
Write-Host "##vso[task.setvariable variable=skipDependencyIsolationTests;]false"
}
displayName: 'Set SkipDependencyIsolationTests variable'
condition: or(eq(variables.isSdkRelease, true), eq(variables['USETESTPYTHONSDK'], true))
- powershell: |
Write-Host "skipDependencyIsolationTests: $(skipDependencyIsolationTests)"
displayName: 'Display SkipDependencyIsolationTests variable'
- bash: |
python -m pytest -q -n auto --dist loadfile --reruns 4 --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend tests/extension_tests/deferred_bindings_tests tests/extension_tests/http_v2_tests
env:
Expand All @@ -125,5 +143,5 @@ jobs:
AzureWebJobsSqlConnectionString: $(SQL_CONNECTION)
AzureWebJobsEventGridTopicUri: $(EVENTGRID_URI)
AzureWebJobsEventGridConnectionKey: $(EVENTGRID_CONNECTION)
USETESTPYTHONSDK: or(eq(variables.isSdkRelease, true), eq(variables['USETESTPYTHONSDK'], true))
skipDependencyIsolationTests: $(skipDependencyIsolationTests)
displayName: "Running $(PYTHON_VERSION) Python E2E Tests"
2 changes: 1 addition & 1 deletion tests/endtoend/test_dependency_isolation_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def test_paths_resolution(self):
).lower()
)

@skipIf(is_envvar_true('USETESTPYTHONSDK'),
@skipIf(is_envvar_true('skipDependencyIsolationTests'),
'Running tests using an editable azure-functions package.')
def test_loading_libraries_from_customers_package(self):
"""Since the Python now loaded the customer's dependencies, the
Expand Down

0 comments on commit 7ba9422

Please sign in to comment.