Skip to content

Commit 124874b

Browse files
Add smoke tests, one per functions version (#1745)
Co-authored-by: Chris Gillum <[email protected]>
1 parent 47247f9 commit 124874b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1302
-0
lines changed

WebJobs.Extensions.DurableTask.sln

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,22 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2323
README.md = README.md
2424
EndProjectSection
2525
EndProject
26+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VSSampleV1", "test\SmokeTests\SmokeTestsV1\VSSampleV1.csproj", "{78141F66-4DDD-4ABB-9DE3-D0B426FE8110}"
27+
EndProject
28+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SmokeTests", "SmokeTests", "{A8CF6993-258A-484A-AF6D-6CC88D36AF93}"
29+
EndProject
30+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VSSampleV2", "test\SmokeTests\SmokeTestsV2\VSSampleV2.csproj", "{E997024B-633E-4252-880B-E2A726E1B4A4}"
31+
EndProject
32+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VSSampleV3", "test\SmokeTests\SmokeTestsV3\VSSampleV3.csproj", "{F1611EF4-457B-47CB-94E9-B611EE488984}"
33+
EndProject
34+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "JavaScript", "JavaScript", "{7B2EDAEC-CFD0-404A-8E52-133FFF595C2F}"
35+
EndProject
36+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "extensions", "test\SmokeTests\OOProcSmokeTests\durableJS\extensions.csproj", "{9BA6093A-F71A-49F9-A159-B98ACBE41636}"
37+
EndProject
38+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Python", "Python", "{FA53EBC4-8265-4063-B9F8-0D5EA0366B90}"
39+
EndProject
40+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "extensions", "test\SmokeTests\OOProcSmokeTests\durablePy\extensions.csproj", "{CB481383-8B54-4FCB-8DCB-F348E08C2A9C}"
41+
EndProject
2642
Global
2743
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2844
Debug|Any CPU = Debug|Any CPU
@@ -41,6 +57,26 @@ Global
4157
{F99CA746-553C-43B4-943B-59A5D190459A}.Debug|Any CPU.Build.0 = Debug|Any CPU
4258
{F99CA746-553C-43B4-943B-59A5D190459A}.Release|Any CPU.ActiveCfg = Release|Any CPU
4359
{F99CA746-553C-43B4-943B-59A5D190459A}.Release|Any CPU.Build.0 = Release|Any CPU
60+
{78141F66-4DDD-4ABB-9DE3-D0B426FE8110}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
61+
{78141F66-4DDD-4ABB-9DE3-D0B426FE8110}.Debug|Any CPU.Build.0 = Debug|Any CPU
62+
{78141F66-4DDD-4ABB-9DE3-D0B426FE8110}.Release|Any CPU.ActiveCfg = Release|Any CPU
63+
{78141F66-4DDD-4ABB-9DE3-D0B426FE8110}.Release|Any CPU.Build.0 = Release|Any CPU
64+
{E997024B-633E-4252-880B-E2A726E1B4A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
65+
{E997024B-633E-4252-880B-E2A726E1B4A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
66+
{E997024B-633E-4252-880B-E2A726E1B4A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
67+
{E997024B-633E-4252-880B-E2A726E1B4A4}.Release|Any CPU.Build.0 = Release|Any CPU
68+
{F1611EF4-457B-47CB-94E9-B611EE488984}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
69+
{F1611EF4-457B-47CB-94E9-B611EE488984}.Debug|Any CPU.Build.0 = Debug|Any CPU
70+
{F1611EF4-457B-47CB-94E9-B611EE488984}.Release|Any CPU.ActiveCfg = Release|Any CPU
71+
{F1611EF4-457B-47CB-94E9-B611EE488984}.Release|Any CPU.Build.0 = Release|Any CPU
72+
{9BA6093A-F71A-49F9-A159-B98ACBE41636}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
73+
{9BA6093A-F71A-49F9-A159-B98ACBE41636}.Debug|Any CPU.Build.0 = Debug|Any CPU
74+
{9BA6093A-F71A-49F9-A159-B98ACBE41636}.Release|Any CPU.ActiveCfg = Release|Any CPU
75+
{9BA6093A-F71A-49F9-A159-B98ACBE41636}.Release|Any CPU.Build.0 = Release|Any CPU
76+
{CB481383-8B54-4FCB-8DCB-F348E08C2A9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
77+
{CB481383-8B54-4FCB-8DCB-F348E08C2A9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
78+
{CB481383-8B54-4FCB-8DCB-F348E08C2A9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
79+
{CB481383-8B54-4FCB-8DCB-F348E08C2A9C}.Release|Any CPU.Build.0 = Release|Any CPU
4480
EndGlobalSection
4581
GlobalSection(SolutionProperties) = preSolution
4682
HideSolutionNode = FALSE
@@ -49,6 +85,14 @@ Global
4985
{51790AFE-5B8E-4795-9EA3-D2B15D04B5AC} = {7EC858EE-3481-4A82-AED4-CB00C34F42D0}
5086
{F2A5DABB-36D4-4152-AF49-2570149899E1} = {78BCF152-C22C-408F-9FB1-0F8C99B154B5}
5187
{F99CA746-553C-43B4-943B-59A5D190459A} = {78BCF152-C22C-408F-9FB1-0F8C99B154B5}
88+
{78141F66-4DDD-4ABB-9DE3-D0B426FE8110} = {A8CF6993-258A-484A-AF6D-6CC88D36AF93}
89+
{A8CF6993-258A-484A-AF6D-6CC88D36AF93} = {78BCF152-C22C-408F-9FB1-0F8C99B154B5}
90+
{E997024B-633E-4252-880B-E2A726E1B4A4} = {A8CF6993-258A-484A-AF6D-6CC88D36AF93}
91+
{F1611EF4-457B-47CB-94E9-B611EE488984} = {A8CF6993-258A-484A-AF6D-6CC88D36AF93}
92+
{7B2EDAEC-CFD0-404A-8E52-133FFF595C2F} = {A8CF6993-258A-484A-AF6D-6CC88D36AF93}
93+
{9BA6093A-F71A-49F9-A159-B98ACBE41636} = {7B2EDAEC-CFD0-404A-8E52-133FFF595C2F}
94+
{FA53EBC4-8265-4063-B9F8-0D5EA0366B90} = {A8CF6993-258A-484A-AF6D-6CC88D36AF93}
95+
{CB481383-8B54-4FCB-8DCB-F348E08C2A9C} = {FA53EBC4-8265-4063-B9F8-0D5EA0366B90}
5296
EndGlobalSection
5397
GlobalSection(ExtensibilityGlobals) = postSolution
5498
SolutionGuid = {5E9AC327-DE18-41A5-A55D-E44CB4281943}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*.js.map
2+
*.ts
3+
.git*
4+
.vscode
5+
local.settings.json
6+
test
7+
tsconfig.json
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
24+
# nyc test coverage
25+
.nyc_output
26+
27+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
28+
.grunt
29+
30+
# Bower dependency directory (https://bower.io/)
31+
bower_components
32+
33+
# node-waf configuration
34+
.lock-wscript
35+
36+
# Compiled binary addons (https://nodejs.org/api/addons.html)
37+
build/Release
38+
39+
# Dependency directories
40+
node_modules/
41+
jspm_packages/
42+
43+
# TypeScript v1 declaration files
44+
typings/
45+
46+
# Optional npm cache directory
47+
.npm
48+
49+
# Optional eslint cache
50+
.eslintcache
51+
52+
# Optional REPL history
53+
.node_repl_history
54+
55+
# Output of 'npm pack'
56+
*.tgz
57+
58+
# Yarn Integrity file
59+
.yarn-integrity
60+
61+
# dotenv environment variables file
62+
.env
63+
.env.test
64+
65+
# parcel-bundler cache (https://parceljs.org/)
66+
.cache
67+
68+
# next.js build output
69+
.next
70+
71+
# nuxt.js build output
72+
.nuxt
73+
74+
# vuepress build output
75+
.vuepress/dist
76+
77+
# Serverless directories
78+
.serverless/
79+
80+
# FuseBox cache
81+
.fusebox/
82+
83+
# DynamoDB Local files
84+
.dynamodb/
85+
86+
# TypeScript output
87+
dist
88+
out
89+
90+
# Azure Functions artifacts
91+
bin
92+
obj
93+
appsettings.json
94+
local.settings.json
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"bindings": [
3+
{
4+
"authLevel": "anonymous",
5+
"name": "req",
6+
"type": "httpTrigger",
7+
"direction": "in",
8+
"methods": [
9+
"post",
10+
"get"
11+
]
12+
},
13+
{
14+
"name": "$return",
15+
"type": "http",
16+
"direction": "out"
17+
},
18+
{
19+
"name": "starter",
20+
"type": "orchestrationClient",
21+
"direction": "in"
22+
}
23+
]
24+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const df = require("durable-functions");
2+
3+
module.exports = async function (context, req) {
4+
const client = df.getClient(context);
5+
const instanceId = await client.startNew("DurableFunctionsOrchestratorJS", undefined, req.body);
6+
7+
context.log(`Started orchestration with ID = '${instanceId}'.`);
8+
9+
return client.createCheckStatusResponse(context.bindingData.req, instanceId);
10+
};
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"bindings": [
3+
{
4+
"name": "context",
5+
"type": "orchestrationTrigger",
6+
"direction": "in"
7+
}
8+
]
9+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* This function is not intended to be invoked directly. Instead it will be
3+
* triggered by an HTTP starter function.
4+
*
5+
* Before running this sample, please:
6+
* - create a Durable activity function (default name is "Hello")
7+
* - create a Durable HTTP starter function
8+
* - run 'npm install durable-functions' from the wwwroot folder of your
9+
* function app in Kudu
10+
*/
11+
12+
const df = require("durable-functions");
13+
14+
module.exports = df.orchestrator(function* (context) {
15+
const outputs = [];
16+
17+
// Replace "Hello" with the name of your Durable Activity Function.
18+
outputs.push(yield context.df.callActivity("Hello", "Tokyo"));
19+
outputs.push(yield context.df.callActivity("Hello", "Seattle"));
20+
outputs.push(yield context.df.callActivity("Hello", "London"));
21+
22+
// returns ["Hello Tokyo!", "Hello Seattle!", "Hello London!"]
23+
return outputs;
24+
});
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"bindings": [
3+
{
4+
"name": "name",
5+
"type": "activityTrigger",
6+
"direction": "in"
7+
}
8+
]
9+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* This function is not intended to be invoked directly. Instead it will be
3+
* triggered by an orchestrator function.
4+
*
5+
* Before running this sample, please:
6+
* - create a Durable orchestration function
7+
* - create a Durable HTTP starter function
8+
* - run 'npm install durable-functions' from the wwwroot folder of your
9+
* function app in Kudu
10+
*/
11+
12+
module.exports = async function (context) {
13+
return `Hello ${context.bindings.name}!`;
14+
};
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<add key="local" value="." />
5+
<add key="azure_app_service" value="https://www.myget.org/F/azure-appservice/api/v2" />
6+
</packageSources>
7+
</configuration>

0 commit comments

Comments
 (0)