Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
9f91548
Add servicebus sdk worker tests
hallvictoria May 7, 2025
43e4b4f
Add as part of current sb tests
hallvictoria May 7, 2025
b43cd48
remove old file
hallvictoria May 7, 2025
b1d88ee
renaming
hallvictoria May 7, 2025
f92b5a2
fixes + refactor blob sdk to emulator
hallvictoria May 7, 2025
3078d4d
directory fix
hallvictoria May 8, 2025
a6b1d0d
directory fix
hallvictoria May 8, 2025
ab038f4
Merge branch 'dev' of https://github.com/Azure/azure-functions-python…
hallvictoria May 8, 2025
fad1242
rename sb directory
hallvictoria May 12, 2025
d30a219
move emulator connection strings to variable groups
hallvictoria May 13, 2025
a3cf630
same for unit tests
hallvictoria May 13, 2025
4ade5eb
add sb topic tests
hallvictoria May 13, 2025
c9a239a
Revert me later
hallvictoria May 28, 2025
56709da
remove topic tests
hallvictoria Jun 6, 2025
f303344
Add snake case tests + remove topic test + single sb batch test
hallvictoria Jun 6, 2025
b484718
dir fix
hallvictoria Jun 9, 2025
d9cf250
fix tests
hallvictoria Jun 27, 2025
90d1302
merge with dev
hallvictoria Jul 16, 2025
b0133f7
remove testqueue-batch + debugging e2e
hallvictoria Jul 16, 2025
172bf2b
remove debug log
hallvictoria Jul 16, 2025
42e537e
fix eg connection reference
hallvictoria Jul 16, 2025
549c5d7
move emulator var group to separate file
hallvictoria Jul 17, 2025
551568a
off
hallvictoria Jul 17, 2025
9ee925b
fix merge conflicts
hallvictoria Sep 9, 2025
06bbd0f
lint
hallvictoria Sep 9, 2025
ca2ee66
Merge branch 'dev' into extensions/azurefunctions-extensions-bindings…
hallvictoria Sep 9, 2025
7c8e9b5
remove batch
hallvictoria Sep 9, 2025
a466c91
merge fixes
hallvictoria Sep 9, 2025
e8af8dc
fix test dir
hallvictoria Sep 11, 2025
6e3b7f3
fix test dir pt 2
hallvictoria Sep 11, 2025
31206d8
fix miss
hallvictoria Sep 11, 2025
9eb1723
Merge branch 'dev' into extensions/azurefunctions-extensions-bindings…
hallvictoria Sep 15, 2025
209f352
remove v1 tests
hallvictoria Sep 16, 2025
e27bcb6
fix tests
hallvictoria Sep 16, 2025
0c84dab
lint
hallvictoria Sep 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 0 additions & 71 deletions .github/ISSUE_TEMPLATE/deferred_bindings_bug_report.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/ISSUE_TEMPLATE/deferred_bindings_feature_request.yml

This file was deleted.

1 change: 1 addition & 0 deletions eng/ci/emulator-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ variables:
- template: /ci/variables/build.yml@eng
- template: /ci/variables/cfs.yml@eng
- template: /eng/templates/utils/variables.yml@self
- template: /eng/templates/utils/emulator-variables.yml@self

extends:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1es
Expand Down
1 change: 1 addition & 0 deletions eng/ci/public-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ resources:

variables:
- template: /eng/templates/utils/variables.yml@self
- template: /eng/templates/utils/emulator-variables.yml@self

extends:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1es
Expand Down
6 changes: 4 additions & 2 deletions eng/templates/jobs/ci-emulator-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ jobs:
- bash: |
python -m pytest -q --dist loadfile --reruns 4 --ignore=tests/emulator_tests/test_servicebus_functions.py tests/emulator_tests
env:
AzureWebJobsStorage: "UseDevelopmentStorage=true"
AzureWebJobsStorage: $(AzureWebJobsStorage)
AZURE_STORAGE_CONNECTION_STRING: $(AZURE_STORAGE_CONNECTION_STRING)
AzureWebJobsEventHubConnectionString: $(EmulatorEventHubConnectionString)
AzureWebJobsCosmosDBConnectionString: $(EmulatorCosmosDBConnectionString)
CosmosDBEmulatorUrl: $(CosmosDBEmulatorUrl)
Expand All @@ -109,7 +110,8 @@ jobs:
- bash: |
python -m pytest -q --dist loadfile --reruns 4 tests/emulator_tests/test_servicebus_functions.py
env:
AzureWebJobsStorage: "UseDevelopmentStorage=true"
AzureWebJobsStorage: $(AzureWebJobsStorage)
AzureWebJobsServiceBusConnectionString: $(EmulatorServiceBusConnectionString)
AzureWebJobsServiceBusSDKConnectionString: $(AzureWebJobsServiceBusSDKConnectionString)
workingDirectory: $(Build.SourcesDirectory)/${{ parameters.PROJECT_DIRECTORY }}
displayName: "Running $(PYTHON_VERSION) Python ServiceBus Linux Emulator Tests"
1 change: 1 addition & 0 deletions eng/templates/jobs/ci-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@ jobs:
condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false))
env:
PYTHON_VERSION: $(PYTHON_VERSION)
AZURE_STORAGE_CONNECTION_STRING: $(AZURE_STORAGE_CONNECTION_STRING)
workingDirectory: $(Build.SourcesDirectory)/${{ parameters.PROJECT_DIRECTORY }}

2 changes: 1 addition & 1 deletion eng/templates/official/jobs/ci-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
Write-Host "skipTest: $(skipTest)"
displayName: 'Display skipTest variable'
- bash: |
python -m pytest -q --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
python -m pytest -q --dist loadfile --reruns 4 --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
env:
AzureWebJobsStorage: $(STORAGE_CONNECTION)
AzureWebJobsCosmosDBConnectionString: $(COSMOSDB_CONNECTION)
Expand Down
2 changes: 2 additions & 0 deletions eng/templates/utils/emulator-variables.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
variables:
- group: python-emulator-resources
4 changes: 3 additions & 1 deletion workers/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ dev = [
"pre-commit",
"invoke",
"cryptography",
"jsonpickle",
"orjson"
]
test-http-v2 = [
Expand All @@ -90,7 +91,8 @@ test-http-v2 = [
]
test-deferred-bindings = [
"azurefunctions-extensions-bindings-blob==1.1.1",
"azurefunctions-extensions-bindings-eventhub==1.0.0b1"
"azurefunctions-extensions-bindings-eventhub==1.0.0b1",
"azurefunctions-extensions-bindings-servicebus==1.0.0b1"
]

[build-system]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@app.function_name(name="put_bc_trigger")
@app.blob_output(arg_name="file",
path="python-worker-tests/test-blobclient-trigger.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
@app.route(route="put_bc_trigger")
def put_bc_trigger(req: func.HttpRequest, file: func.Out[str]) -> str:
file.set(req.get_body())
Expand All @@ -21,10 +21,10 @@ def put_bc_trigger(req: func.HttpRequest, file: func.Out[str]) -> str:
@app.function_name(name="bc_blob_trigger")
@app.blob_trigger(arg_name="client",
path="python-worker-tests/test-blobclient-trigger.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
@app.blob_output(arg_name="$return",
path="python-worker-tests/test-blobclient-triggered.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
def bc_blob_trigger(client: blob.BlobClient) -> str:
blob_properties = client.get_blob_properties()
file = client.download_blob(encoding='utf-8').readall()
Expand All @@ -38,7 +38,7 @@ def bc_blob_trigger(client: blob.BlobClient) -> str:
@app.function_name(name="get_bc_blob_triggered")
@app.blob_input(arg_name="client",
path="python-worker-tests/test-blobclient-triggered.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
@app.route(route="get_bc_blob_triggered")
def get_bc_blob_triggered(req: func.HttpRequest,
client: blob.BlobClient) -> str:
Expand All @@ -48,7 +48,7 @@ def get_bc_blob_triggered(req: func.HttpRequest,
@app.function_name(name="put_cc_trigger")
@app.blob_output(arg_name="file",
path="python-worker-tests/test-containerclient-trigger.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
@app.route(route="put_cc_trigger")
def put_cc_trigger(req: func.HttpRequest, file: func.Out[str]) -> str:
file.set(req.get_body())
Expand All @@ -58,10 +58,10 @@ def put_cc_trigger(req: func.HttpRequest, file: func.Out[str]) -> str:
@app.function_name(name="cc_blob_trigger")
@app.blob_trigger(arg_name="client",
path="python-worker-tests/test-containerclient-trigger.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
@app.blob_output(arg_name="$return",
path="python-worker-tests/test-containerclient-triggered.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
def cc_blob_trigger(client: blob.ContainerClient) -> str:
container_properties = client.get_container_properties()
file = client.download_blob("test-containerclient-trigger.txt",
Expand All @@ -75,7 +75,7 @@ def cc_blob_trigger(client: blob.ContainerClient) -> str:
@app.function_name(name="get_cc_blob_triggered")
@app.blob_input(arg_name="client",
path="python-worker-tests/test-containerclient-triggered.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
@app.route(route="get_cc_blob_triggered")
def get_cc_blob_triggered(req: func.HttpRequest,
client: blob.ContainerClient) -> str:
Expand All @@ -86,7 +86,7 @@ def get_cc_blob_triggered(req: func.HttpRequest,
@app.function_name(name="put_ssd_trigger")
@app.blob_output(arg_name="file",
path="python-worker-tests/test-ssd-trigger.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
@app.route(route="put_ssd_trigger")
def put_ssd_trigger(req: func.HttpRequest, file: func.Out[str]) -> str:
file.set(req.get_body())
Expand All @@ -96,10 +96,10 @@ def put_ssd_trigger(req: func.HttpRequest, file: func.Out[str]) -> str:
@app.function_name(name="ssd_blob_trigger")
@app.blob_trigger(arg_name="stream",
path="python-worker-tests/test-ssd-trigger.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
@app.blob_output(arg_name="$return",
path="python-worker-tests/test-ssd-triggered.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
def ssd_blob_trigger(stream: blob.StorageStreamDownloader) -> str:
# testing chunking
file = ""
Expand All @@ -113,7 +113,7 @@ def ssd_blob_trigger(stream: blob.StorageStreamDownloader) -> str:
@app.function_name(name="get_ssd_blob_triggered")
@app.blob_input(arg_name="stream",
path="python-worker-tests/test-ssd-triggered.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
@app.route(route="get_ssd_blob_triggered")
def get_ssd_blob_triggered(req: func.HttpRequest,
stream: blob.StorageStreamDownloader) -> str:
Expand All @@ -124,7 +124,7 @@ def get_ssd_blob_triggered(req: func.HttpRequest,
@app.route(route="get_bc_bytes")
@app.blob_input(arg_name="client",
path="python-worker-tests/test-blob-extension-bytes.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
def get_bc_bytes(req: func.HttpRequest, client: blob.BlobClient) -> str:
return client.download_blob(encoding='utf-8').readall()

Expand All @@ -133,7 +133,7 @@ def get_bc_bytes(req: func.HttpRequest, client: blob.BlobClient) -> str:
@app.route(route="get_cc_bytes")
@app.blob_input(arg_name="client",
path="python-worker-tests/test-blob-extension-bytes.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
def get_cc_bytes(req: func.HttpRequest,
client: blob.ContainerClient) -> str:
return client.download_blob("test-blob-extension-bytes.txt",
Expand All @@ -144,7 +144,7 @@ def get_cc_bytes(req: func.HttpRequest,
@app.route(route="get_ssd_bytes")
@app.blob_input(arg_name="stream",
path="python-worker-tests/test-blob-extension-bytes.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
def get_ssd_bytes(req: func.HttpRequest,
stream: blob.StorageStreamDownloader) -> str:
return stream.readall().decode('utf-8')
Expand All @@ -154,7 +154,7 @@ def get_ssd_bytes(req: func.HttpRequest,
@app.route(route="get_bc_str")
@app.blob_input(arg_name="client",
path="python-worker-tests/test-blob-extension-str.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
def get_bc_str(req: func.HttpRequest, client: blob.BlobClient) -> str:
return client.download_blob(encoding='utf-8').readall()

Expand All @@ -163,7 +163,7 @@ def get_bc_str(req: func.HttpRequest, client: blob.BlobClient) -> str:
@app.route(route="get_cc_str")
@app.blob_input(arg_name="client",
path="python-worker-tests",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
def get_cc_str(req: func.HttpRequest, client: blob.ContainerClient) -> str:
return client.download_blob("test-blob-extension-str.txt",
encoding='utf-8').readall()
Expand All @@ -173,7 +173,7 @@ def get_cc_str(req: func.HttpRequest, client: blob.ContainerClient) -> str:
@app.route(route="get_ssd_str")
@app.blob_input(arg_name="stream",
path="python-worker-tests/test-blob-extension-str.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
def get_ssd_str(req: func.HttpRequest, stream: blob.StorageStreamDownloader) -> str:
return stream.readall().decode('utf-8')

Expand All @@ -183,11 +183,11 @@ def get_ssd_str(req: func.HttpRequest, stream: blob.StorageStreamDownloader) ->
@app.blob_input(arg_name="client",
path="python-worker-tests/test-blob-extension-str.txt",
data_type="STRING",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
@app.blob_input(arg_name="blob",
path="python-worker-tests/test-blob-extension-str.txt",
data_type="STRING",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
def bc_and_inputstream_input(req: func.HttpRequest, client: blob.BlobClient,
blob: func.InputStream) -> str:
output_msg = ""
Expand All @@ -202,11 +202,11 @@ def bc_and_inputstream_input(req: func.HttpRequest, client: blob.BlobClient,
@app.blob_input(arg_name="blob",
path="python-worker-tests/test-blob-extension-str.txt",
data_type="STRING",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
@app.blob_input(arg_name="client",
path="python-worker-tests/test-blob-extension-str.txt",
data_type="STRING",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
def inputstream_and_bc_input(req: func.HttpRequest, blob: func.InputStream,
client: blob.BlobClient) -> str:
output_msg = ""
Expand All @@ -221,7 +221,7 @@ def inputstream_and_bc_input(req: func.HttpRequest, blob: func.InputStream,
@app.blob_input(arg_name="file",
path="python-worker-tests/test-blob-extension-str.txt",
data_type="STRING",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
def type_undefined(req: func.HttpRequest, file) -> str:
assert not isinstance(file, blob.BlobClient)
assert not isinstance(file, blob.ContainerClient)
Expand All @@ -232,7 +232,7 @@ def type_undefined(req: func.HttpRequest, file) -> str:
@app.function_name(name="put_blob_str")
@app.blob_output(arg_name="file",
path="python-worker-tests/test-blob-extension-str.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
@app.route(route="put_blob_str")
def put_blob_str(req: func.HttpRequest, file: func.Out[str]) -> str:
file.set(req.get_body())
Expand All @@ -242,7 +242,7 @@ def put_blob_str(req: func.HttpRequest, file: func.Out[str]) -> str:
@app.function_name(name="put_blob_bytes")
@app.blob_output(arg_name="file",
path="python-worker-tests/test-blob-extension-bytes.txt",
connection="AzureWebJobsStorage")
connection="AZURE_STORAGE_CONNECTION_STRING")
@app.route(route="put_blob_bytes")
def put_blob_bytes(req: func.HttpRequest, file: func.Out[bytes]) -> str:
file.set(req.get_body())
Expand Down
Loading