Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions eng/ci/templates/official/jobs/run-non-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ jobs:
targetType: inline
script: 'Install-Module -Name Az.Storage -RequiredVersion 1.11.0 -Scope CurrentUser -Force -AllowClobber'

- pwsh: |
Import-Module "$env:ProgramFiles\Azure Cosmos DB Emulator\PSModules\Microsoft.Azure.CosmosDB.Emulator"
Start-CosmosDbEmulator -NoFirewall -NoUI

# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="public emulator key, not confidential")]
Write-Host "##vso[task.setvariable variable=CosmosDB]AccountEndpoint=https://localhost:8081/;AccountKey=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==;"
displayName: Start cosmosdb

- task: AzurePowerShell@5
displayName: Checkout secrets
inputs:
Expand Down
14 changes: 13 additions & 1 deletion src/WebJobs.Script/runtimeassemblies.json
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,18 @@
"name": "Microsoft.Azure.AppService.Proxy.Runtime",
"resolutionPolicy": "private"
},
{
"name": "Microsoft.Azure.Cosmos.Client",
"resolutionPolicy": "private"
},
{
"name": "Microsoft.Azure.Cosmos.Core",
"resolutionPolicy": "private"
},
{
"name": "Microsoft.Azure.Cosmos.Direct",
"resolutionPolicy": "private"
},
{
"name": "Microsoft.Azure.Functions.Platform.Metrics.LinuxConsumption",
"resolutionPolicy": "private"
Expand Down Expand Up @@ -946,7 +958,7 @@
{
"name": "OpenTelemetry.Api.ProviderBuilderExtensions",
"resolutionPolicy": "private"
},
},
{
"name": "OpenTelemetry.Exporter.OpenTelemetryProtocol",
"resolutionPolicy": "private"
Expand Down
2 changes: 1 addition & 1 deletion test/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<!-- Supporting Packages -->
<ItemGroup>
<PackageVersion Include="Microsoft.AspNet.WebApi.Core" Version="5.2.6" />
<PackageVersion Include="Microsoft.Azure.DocumentDB.Core" Version="2.11.2" />
<PackageVersion Include="Microsoft.Azure.Cosmos" Version="3.54.0" />
<PackageVersion Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="4.0.5-11874" />
<PackageVersion Include="Microsoft.Azure.Storage.Blob" Version="11.2.3" />
</ItemGroup>
Expand Down
26 changes: 0 additions & 26 deletions test/Resources/TestScripts/CSharp/CosmosDBIn/function.json

This file was deleted.

22 changes: 0 additions & 22 deletions test/Resources/TestScripts/CSharp/CosmosDBIn/run.csx

This file was deleted.

25 changes: 0 additions & 25 deletions test/Resources/TestScripts/CSharp/CosmosDBOut/function.json

This file was deleted.

14 changes: 0 additions & 14 deletions test/Resources/TestScripts/CSharp/CosmosDBOut/run.csx

This file was deleted.

18 changes: 0 additions & 18 deletions test/Resources/TestScripts/CSharp/CosmosDBTrigger/function.json

This file was deleted.

10 changes: 0 additions & 10 deletions test/Resources/TestScripts/CSharp/CosmosDBTrigger/run.csx

This file was deleted.

20 changes: 7 additions & 13 deletions test/Resources/TestScripts/Node/CosmosDBIn/function.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"bindings": [
{
"type": "queueTrigger",
Expand All @@ -11,24 +11,18 @@
"name": "itemIn",
"direction": "in",
"databaseName": "ItemDb",
"collectionName": "ItemCollection",
"id": "{documentId}"
},
{
"type": "cosmosDB",
"name": "relatedItems",
"direction": "in",
"databaseName": "ItemDb",
"collectionName": "ItemCollection",
"sqlQuery": "SELECT f.id, f.related FROM f WHERE f.related = {documentId}"
"containerName": "ItemCollection",
"partitionKey": "{id}",
"id": "{id}"
},
{
"type": "cosmosDB",
"name": "itemOut",
"direction": "out",
"databaseName": "ItemDb",
"collectionName": "ItemCollection",
"createIfNotExists": true
"containerName": "ItemCollection",
"createIfNotExists": true,
"partitionKey": "{id}"
}
]
}
10 changes: 5 additions & 5 deletions test/Resources/TestScripts/Node/CosmosDBIn/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module.exports = function (context, input) {
module.exports = function (context, input) {

context.log(context.bindings);

var relatedCount = context.bindings.relatedItems.length;
if (relatedCount !== 3) {
throw Error("Expected 3 documents. Found " + relatedCount);
}
//var relatedCount = context.bindings.relatedItems.length;
//if (relatedCount !== 3) {
// throw Error("Expected 3 documents. Found " + relatedCount);
//}

context.bindings.itemOut = context.bindings.itemIn;
context.bindings.itemOut.text = "This was updated!";
Expand Down
12 changes: 2 additions & 10 deletions test/Resources/TestScripts/Node/CosmosDBOut/function.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
{
{
"bindings": [
{
"type": "manualTrigger",
"name": "input",
"direction": "in"
},
{
"type": "cosmosDB",
"name": "relatedItems",
"direction": "out",
"databaseName": "ItemDb",
"collectionName": "ItemCollection",
"createIfNotExists": true
},
{
"type": "cosmosDB",
"name": "item",
"direction": "out",
"databaseName": "ItemDb",
"collectionName": "ItemCollection",
"containerName": "ItemCollection",
"createIfNotExists": true
}
]
Expand Down
8 changes: 1 addition & 7 deletions test/Resources/TestScripts/Node/CosmosDBOut/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
module.exports = function (context, input) {
module.exports = function (context, input) {
context.log('Node.js function triggered with input', input);

context.bindings.relatedItems = [
{ related: input },
{ related: input },
{ related: input }
];

context.bindings.item = {
id: input,
text: "Hello from Node!"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
{
{
"bindings": [
{
"type": "cosmosDBTrigger",
"name": "input",
"direction": "in",
"databaseName": "ItemDb",
"collectionName": "ItemCollection",
"createLeaseCollectionIfNotExists": true
"containerName": "ItemCollection",
"connection": "CosmosDB",
"leaseContainerName": "leases",
"createLeaseContainerIfNotExists": true
},
{
"type": "blob",
"name": "blob",
"connection": "AzureWebJobsStorage",
"direction": "out",
"path": "test-output-node/cosmosdbtriggere2e-completed"
}
Expand Down
2 changes: 1 addition & 1 deletion test/Resources/TestScripts/Node/CosmosDBTrigger/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = function (context, input) {
module.exports = function (context, input) {
context.log('Document Id: ', input[0].id);

context.bindings.blob = input[0].id;
Expand Down

This file was deleted.

Loading
Loading