Skip to content

Commit bae5c51

Browse files
author
Evan Roman
committed
test
1 parent 5f2cc67 commit bae5c51

File tree

3 files changed

+43
-43
lines changed

3 files changed

+43
-43
lines changed

app/v3/storageBlobTrigger/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// // Copyright (c) .NET Foundation. All rights reserved.
2-
// // Licensed under the MIT License.
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the MIT License.
33

4-
// import { AzureFunction, Context } from '@azure/functions';
4+
import { AzureFunction, Context } from '@azure/functions';
55

6-
// const blobTrigger: AzureFunction = async function (context: Context, myBlob: any): Promise<void> {
7-
// const blobPath = context.bindingData.blobTrigger;
8-
// context.log(`storageBlobTrigger was triggered by blob "${blobPath}" with content "${myBlob.toString()}"`);
9-
// };
6+
const blobTrigger: AzureFunction = async function (context: Context, myBlob: any): Promise<void> {
7+
const blobPath = context.bindingData.blobTrigger;
8+
context.log(`storageBlobTrigger was triggered by blob "${blobPath}" with content "${myBlob.toString()}"`);
9+
};
1010

11-
// export default blobTrigger;
11+
export default blobTrigger;
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// // Copyright (c) .NET Foundation. All rights reserved.
2-
// // Licensed under the MIT License.
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the MIT License.
33

4-
// import { AzureFunction, Context } from '@azure/functions';
4+
import { AzureFunction, Context } from '@azure/functions';
55

6-
// const blobTrigger: AzureFunction = async function (context: Context, myBlob: any): Promise<any> {
7-
// const blobPath = context.bindingData.blobTrigger;
8-
// context.log(`storageBlobTriggerAndOutput was triggered by blob "${blobPath}" with content "${myBlob.toString()}"`);
9-
// return myBlob;
10-
// };
6+
const blobTrigger: AzureFunction = async function (context: Context, myBlob: any): Promise<any> {
7+
const blobPath = context.bindingData.blobTrigger;
8+
context.log(`storageBlobTriggerAndOutput was triggered by blob "${blobPath}" with content "${myBlob.toString()}"`);
9+
return myBlob;
10+
};
1111

12-
// export default blobTrigger;
12+
export default blobTrigger;
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
// Copyright (c) .NET Foundation. All rights reserved.
2-
// Licensed under the MIT License.
1+
// // Copyright (c) .NET Foundation. All rights reserved.
2+
// // Licensed under the MIT License.
33

4-
import { app, InvocationContext, output } from '@azure/functions';
4+
// import { app, InvocationContext, output } from '@azure/functions';
55

6-
// Test for bug https://github.com/Azure/azure-functions-nodejs-library/issues/179
6+
// // Test for bug https://github.com/Azure/azure-functions-nodejs-library/issues/179
77

8-
const queueOutput = output.storageQueue({
9-
queueName: 'e2e-test-queue-trigger',
10-
connection: 'AzureWebJobsStorage',
11-
});
8+
// const queueOutput = output.storageQueue({
9+
// queueName: 'e2e-test-queue-trigger',
10+
// connection: 'AzureWebJobsStorage',
11+
// });
1212

13-
app.storageBlob('storageBlobTriggerReturnOutput', {
14-
path: 'e2e-test-container/e2e-test-blob-trigger-shared-output-bug',
15-
connection: 'AzureWebJobsStorage',
16-
return: queueOutput,
17-
handler: (blob: Buffer, context: InvocationContext) => {
18-
context.log(`storageBlobTriggerReturnOutput was triggered`);
19-
return `${blob.toString()}-returnOutput`;
20-
},
21-
});
13+
// app.storageBlob('storageBlobTriggerReturnOutput', {
14+
// path: 'e2e-test-container/e2e-test-blob-trigger-shared-output-bug',
15+
// connection: 'AzureWebJobsStorage',
16+
// return: queueOutput,
17+
// handler: (blob: Buffer, context: InvocationContext) => {
18+
// context.log(`storageBlobTriggerReturnOutput was triggered`);
19+
// return `${blob.toString()}-returnOutput`;
20+
// },
21+
// });
2222

23-
app.storageBlob('storageBlobTriggerExtraOutput', {
24-
path: 'e2e-test-container/e2e-test-blob-trigger-shared-output-bug',
25-
connection: 'AzureWebJobsStorage',
26-
extraOutputs: [queueOutput],
27-
handler: (blob: Buffer, context: InvocationContext) => {
28-
context.log(`storageBlobTriggerExtraOutput was triggered`);
29-
context.extraOutputs.set(queueOutput, `${blob.toString()}-extraOutput`);
30-
},
31-
});
23+
// app.storageBlob('storageBlobTriggerExtraOutput', {
24+
// path: 'e2e-test-container/e2e-test-blob-trigger-shared-output-bug',
25+
// connection: 'AzureWebJobsStorage',
26+
// extraOutputs: [queueOutput],
27+
// handler: (blob: Buffer, context: InvocationContext) => {
28+
// context.log(`storageBlobTriggerExtraOutput was triggered`);
29+
// context.extraOutputs.set(queueOutput, `${blob.toString()}-extraOutput`);
30+
// },
31+
// });

0 commit comments

Comments
 (0)