Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 37975c2

Browse files
committed
Add tests for HttpTrigger and QueueTrigger
1 parent 90a0967 commit 37975c2

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

tests/HttpTrigger.rest

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
POST http://localhost:7071/api/invoices
2+
Content-Type: application/json
3+
4+
{
5+
"container_name": "invoices"
6+
}

tests/QueueTrigger.ps1

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
$LocalConnectionString = "AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;DefaultEndpointsProtocol=http;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;"
2+
3+
$QueueMessage = @{
4+
"container_name" = "invoices"
5+
}
6+
7+
$Base64EncodedMessage = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(($QueueMessage | ConvertTo-Json)))
8+
9+
az storage message put `
10+
--content $Base64EncodedMessage `
11+
--queue-name "invoices" `
12+
--connection-string $LocalConnectionString `
13+
--time-to-live 86400

tests/RunOrchestration.rest

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)