diff --git a/samples/samples-powershell/ProductsTrigger/run.ps1 b/samples/samples-powershell/ProductsTrigger/run.ps1
index 74f920178..6c13165f3 100644
--- a/samples/samples-powershell/ProductsTrigger/run.ps1
+++ b/samples/samples-powershell/ProductsTrigger/run.ps1
@@ -4,8 +4,7 @@
using namespace System.Net
param($changes)
-$changesJson = $changes | ConvertTo-Json
# The output is used to inspect the trigger binding parameter in test methods.
-# Removing new lines for testing purposes.
-$changesJson = $changesJson -replace [Environment]::NewLine,"";
+# Use -Compress to remove new lines and spaces for testing purposes.
+$changesJson = $changes | ConvertTo-Json -Compress
Write-Host "SQL Changes: $changesJson"
\ No newline at end of file
diff --git a/test/Integration/SqlTriggerBindingIntegrationTests.cs b/test/Integration/SqlTriggerBindingIntegrationTests.cs
index 0e6984ebe..cb7dcc367 100644
--- a/test/Integration/SqlTriggerBindingIntegrationTests.cs
+++ b/test/Integration/SqlTriggerBindingIntegrationTests.cs
@@ -166,8 +166,10 @@ await this.WaitForProductChanges(
///
/// Verifies that manually setting the polling interval correctly changes the delay between processing each batch of changes
///
- [Fact]
- public async Task PollingIntervalOverrideTriggerTest()
+ [Theory]
+ [SqlInlineData()]
+ [UnsupportedLanguages(SupportedLanguages.Java, SupportedLanguages.OutOfProc)]
+ public async Task PollingIntervalOverrideTriggerTest(SupportedLanguages lang)
{
const int firstId = 1;
// Use enough items to require 5 batches to be processed - the test will
@@ -184,7 +186,7 @@ public async Task PollingIntervalOverrideTriggerTest()
pollingIntervalMs.ToString());
this.StartFunctionHost(
nameof(ProductsTriggerWithValidation),
- SupportedLanguages.CSharp,
+ lang,
useTestFolder: true,
customOutputHandler: handler,
environmentVariables: new Dictionary() {
@@ -289,8 +291,10 @@ await this.WaitForProductChanges(
///
/// Ensures correct functionality with multiple user functions tracking the same table.
///
- [Fact]
- public async Task MultiFunctionTriggerTest()
+ [Theory]
+ [SqlInlineData()]
+ [UnsupportedLanguages(SupportedLanguages.Java, SupportedLanguages.OutOfProc)]
+ public async Task MultiFunctionTriggerTest(SupportedLanguages lang)
{
const string Trigger1Changes = "Trigger1 Changes: ";
const string Trigger2Changes = "Trigger2 Changes: ";
@@ -298,7 +302,7 @@ public async Task MultiFunctionTriggerTest()
this.SetChangeTrackingForTable("Products");
string functionList = $"{nameof(MultiFunctionTrigger.MultiFunctionTrigger1)} {nameof(MultiFunctionTrigger.MultiFunctionTrigger2)}";
- this.StartFunctionHost(functionList, SupportedLanguages.CSharp, useTestFolder: true);
+ this.StartFunctionHost(functionList, lang, useTestFolder: true);
// 1. INSERT
int firstId = 1;
@@ -466,12 +470,14 @@ await this.WaitForProductChanges(
///
/// Tests the error message when the user table is not present in the database.
///
- [Fact]
- public void TableNotPresentTriggerTest()
+ [Theory]
+ [SqlInlineData()]
+ [UnsupportedLanguages(SupportedLanguages.Java, SupportedLanguages.OutOfProc)]
+ public void TableNotPresentTriggerTest(SupportedLanguages lang)
{
this.StartFunctionHostAndWaitForError(
nameof(TableNotPresentTrigger),
- SupportedLanguages.CSharp,
+ lang,
true,
"Could not find table: 'dbo.TableNotPresent'.");
}
@@ -479,12 +485,14 @@ public void TableNotPresentTriggerTest()
///
/// Tests the error message when the user table does not contain primary key.
///
- [Fact]
- public void PrimaryKeyNotCreatedTriggerTest()
+ [Theory]
+ [SqlInlineData()]
+ [UnsupportedLanguages(SupportedLanguages.Java, SupportedLanguages.OutOfProc)]
+ public void PrimaryKeyNotCreatedTriggerTest(SupportedLanguages lang)
{
this.StartFunctionHostAndWaitForError(
nameof(PrimaryKeyNotPresentTrigger),
- SupportedLanguages.CSharp,
+ lang,
true,
"Could not find primary key created in table: 'dbo.ProductsWithoutPrimaryKey'.");
}
@@ -493,12 +501,14 @@ public void PrimaryKeyNotCreatedTriggerTest()
/// Tests the error message when the user table contains one or more primary keys with names conflicting with
/// column names in the leases table.
///
- [Fact]
- public void ReservedPrimaryKeyColumnNamesTriggerTest()
+ [Theory]
+ [SqlInlineData()]
+ [UnsupportedLanguages(SupportedLanguages.Java, SupportedLanguages.OutOfProc)]
+ public void ReservedPrimaryKeyColumnNamesTriggerTest(SupportedLanguages lang)
{
this.StartFunctionHostAndWaitForError(
nameof(ReservedPrimaryKeyColumnNamesTrigger),
- SupportedLanguages.CSharp,
+ lang,
true,
"Found reserved column name(s): '_az_func_ChangeVersion', '_az_func_AttemptCount', '_az_func_LeaseExpirationTime' in table: 'dbo.ProductsWithReservedPrimaryKeyColumnNames'." +
" Please rename them to be able to use trigger binding.");
@@ -507,12 +517,14 @@ public void ReservedPrimaryKeyColumnNamesTriggerTest()
///
/// Tests the error message when the user table contains columns of unsupported SQL types.
///
- [Fact]
- public void UnsupportedColumnTypesTriggerTest()
+ [Theory]
+ [SqlInlineData()]
+ [UnsupportedLanguages(SupportedLanguages.Java, SupportedLanguages.OutOfProc)]
+ public void UnsupportedColumnTypesTriggerTest(SupportedLanguages lang)
{
this.StartFunctionHostAndWaitForError(
nameof(UnsupportedColumnTypesTrigger),
- SupportedLanguages.CSharp,
+ lang,
true,
"Found column(s) with unsupported type(s): 'Location' (type: geography), 'Geometry' (type: geometry), 'Organization' (type: hierarchyid)" +
" in table: 'dbo.ProductsWithUnsupportedColumnTypes'.");
diff --git a/test/Integration/test-js/MultiFunctionTrigger1/function.json b/test/Integration/test-js/MultiFunctionTrigger1/function.json
new file mode 100644
index 000000000..e277c5e39
--- /dev/null
+++ b/test/Integration/test-js/MultiFunctionTrigger1/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.Products",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file
diff --git a/test/Integration/test-js/MultiFunctionTrigger1/index.js b/test/Integration/test-js/MultiFunctionTrigger1/index.js
new file mode 100644
index 000000000..281c79b3c
--- /dev/null
+++ b/test/Integration/test-js/MultiFunctionTrigger1/index.js
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+
+module.exports = async function (context, changes) {
+ context.log(`Trigger1 Changes: ${JSON.stringify(changes)}`)
+}
\ No newline at end of file
diff --git a/test/Integration/test-js/MultiFunctionTrigger2/function.json b/test/Integration/test-js/MultiFunctionTrigger2/function.json
new file mode 100644
index 000000000..e277c5e39
--- /dev/null
+++ b/test/Integration/test-js/MultiFunctionTrigger2/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.Products",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file
diff --git a/test/Integration/test-js/MultiFunctionTrigger2/index.js b/test/Integration/test-js/MultiFunctionTrigger2/index.js
new file mode 100644
index 000000000..86183fdb4
--- /dev/null
+++ b/test/Integration/test-js/MultiFunctionTrigger2/index.js
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+
+module.exports = async function (context, changes) {
+ context.log(`Trigger2 Changes: ${JSON.stringify(changes)}`)
+}
\ No newline at end of file
diff --git a/test/Integration/test-js/PrimaryKeyNotPresentTrigger/function.json b/test/Integration/test-js/PrimaryKeyNotPresentTrigger/function.json
new file mode 100644
index 000000000..4c8d6d04c
--- /dev/null
+++ b/test/Integration/test-js/PrimaryKeyNotPresentTrigger/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.ProductsWithoutPrimaryKey",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file
diff --git a/test/Integration/test-js/PrimaryKeyNotPresentTrigger/index.js b/test/Integration/test-js/PrimaryKeyNotPresentTrigger/index.js
new file mode 100644
index 000000000..45a0699c9
--- /dev/null
+++ b/test/Integration/test-js/PrimaryKeyNotPresentTrigger/index.js
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+
+module.exports = async function (context, changes) {
+ throw new Error("Associated test case should fail before the function is invoked.");
+}
\ No newline at end of file
diff --git a/test/Integration/test-js/ReservedPrimaryKeyColumnNamesTrigger/function.json b/test/Integration/test-js/ReservedPrimaryKeyColumnNamesTrigger/function.json
new file mode 100644
index 000000000..a6958d8cc
--- /dev/null
+++ b/test/Integration/test-js/ReservedPrimaryKeyColumnNamesTrigger/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.ProductsWithReservedPrimaryKeyColumnNames",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file
diff --git a/test/Integration/test-js/ReservedPrimaryKeyColumnNamesTrigger/index.js b/test/Integration/test-js/ReservedPrimaryKeyColumnNamesTrigger/index.js
new file mode 100644
index 000000000..45a0699c9
--- /dev/null
+++ b/test/Integration/test-js/ReservedPrimaryKeyColumnNamesTrigger/index.js
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+
+module.exports = async function (context, changes) {
+ throw new Error("Associated test case should fail before the function is invoked.");
+}
\ No newline at end of file
diff --git a/test/Integration/test-js/TableNotPresentTrigger/function.json b/test/Integration/test-js/TableNotPresentTrigger/function.json
new file mode 100644
index 000000000..02aa479dc
--- /dev/null
+++ b/test/Integration/test-js/TableNotPresentTrigger/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.TableNotPresent",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file
diff --git a/test/Integration/test-js/TableNotPresentTrigger/index.js b/test/Integration/test-js/TableNotPresentTrigger/index.js
new file mode 100644
index 000000000..45a0699c9
--- /dev/null
+++ b/test/Integration/test-js/TableNotPresentTrigger/index.js
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+
+module.exports = async function (context, changes) {
+ throw new Error("Associated test case should fail before the function is invoked.");
+}
\ No newline at end of file
diff --git a/test/Integration/test-js/UnsupportedColumnTypesTrigger/function.json b/test/Integration/test-js/UnsupportedColumnTypesTrigger/function.json
new file mode 100644
index 000000000..eafe762f1
--- /dev/null
+++ b/test/Integration/test-js/UnsupportedColumnTypesTrigger/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.ProductsWithUnsupportedColumnTypes",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file
diff --git a/test/Integration/test-js/UnsupportedColumnTypesTrigger/index.js b/test/Integration/test-js/UnsupportedColumnTypesTrigger/index.js
new file mode 100644
index 000000000..45a0699c9
--- /dev/null
+++ b/test/Integration/test-js/UnsupportedColumnTypesTrigger/index.js
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+
+module.exports = async function (context, changes) {
+ throw new Error("Associated test case should fail before the function is invoked.");
+}
\ No newline at end of file
diff --git a/test/Integration/test-powershell/MultiFunctionTrigger1/function.json b/test/Integration/test-powershell/MultiFunctionTrigger1/function.json
new file mode 100644
index 000000000..e277c5e39
--- /dev/null
+++ b/test/Integration/test-powershell/MultiFunctionTrigger1/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.Products",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file
diff --git a/test/Integration/test-powershell/MultiFunctionTrigger1/run.ps1 b/test/Integration/test-powershell/MultiFunctionTrigger1/run.ps1
new file mode 100644
index 000000000..789d5a20b
--- /dev/null
+++ b/test/Integration/test-powershell/MultiFunctionTrigger1/run.ps1
@@ -0,0 +1,8 @@
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+
+using namespace System.Net
+
+param($changes)
+$changesJson = $changes | ConvertTo-Json -Compress
+Write-Host "Trigger1 Changes: $changesJson"
\ No newline at end of file
diff --git a/test/Integration/test-powershell/MultiFunctionTrigger2/function.json b/test/Integration/test-powershell/MultiFunctionTrigger2/function.json
new file mode 100644
index 000000000..e277c5e39
--- /dev/null
+++ b/test/Integration/test-powershell/MultiFunctionTrigger2/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.Products",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file
diff --git a/test/Integration/test-powershell/MultiFunctionTrigger2/run.ps1 b/test/Integration/test-powershell/MultiFunctionTrigger2/run.ps1
new file mode 100644
index 000000000..b3ca620ae
--- /dev/null
+++ b/test/Integration/test-powershell/MultiFunctionTrigger2/run.ps1
@@ -0,0 +1,8 @@
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+
+using namespace System.Net
+
+param($changes)
+$changesJson = $changes | ConvertTo-Json -Compress
+Write-Host "Trigger2 Changes: $changesJson"
\ No newline at end of file
diff --git a/test/Integration/test-powershell/PrimaryKeyNotPresentTrigger/function.json b/test/Integration/test-powershell/PrimaryKeyNotPresentTrigger/function.json
new file mode 100644
index 000000000..4c8d6d04c
--- /dev/null
+++ b/test/Integration/test-powershell/PrimaryKeyNotPresentTrigger/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.ProductsWithoutPrimaryKey",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file
diff --git a/test/Integration/test-powershell/PrimaryKeyNotPresentTrigger/run.ps1 b/test/Integration/test-powershell/PrimaryKeyNotPresentTrigger/run.ps1
new file mode 100644
index 000000000..f384f74dc
--- /dev/null
+++ b/test/Integration/test-powershell/PrimaryKeyNotPresentTrigger/run.ps1
@@ -0,0 +1,8 @@
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+
+using namespace System.Net
+
+param($changes)
+
+throw "Associated test case should fail before the function is invoked."
diff --git a/test/Integration/test-powershell/ProductsTriggerWithValidation/run.ps1 b/test/Integration/test-powershell/ProductsTriggerWithValidation/run.ps1
index 8ce36e8da..13596eaae 100644
--- a/test/Integration/test-powershell/ProductsTriggerWithValidation/run.ps1
+++ b/test/Integration/test-powershell/ProductsTriggerWithValidation/run.ps1
@@ -10,6 +10,5 @@ if ($expectedMaxBatchSize -and $expectedMaxBatchSize -ne $changes.Count) {
throw "Invalid max batch size, got $($changes.Count) changes but expected $expectedMaxBatchSize"
}
-$changesJson = $changes | ConvertTo-Json
-$changesJson = $changesJson -replace [Environment]::NewLine,"";
+$changesJson = $changes | ConvertTo-Json -Compress
Write-Host "SQL Changes: $changesJson"
\ No newline at end of file
diff --git a/test/Integration/test-powershell/ReservedPrimaryKeyColumnNamesTrigger/function.json b/test/Integration/test-powershell/ReservedPrimaryKeyColumnNamesTrigger/function.json
new file mode 100644
index 000000000..a6958d8cc
--- /dev/null
+++ b/test/Integration/test-powershell/ReservedPrimaryKeyColumnNamesTrigger/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.ProductsWithReservedPrimaryKeyColumnNames",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file
diff --git a/test/Integration/test-powershell/ReservedPrimaryKeyColumnNamesTrigger/run.ps1 b/test/Integration/test-powershell/ReservedPrimaryKeyColumnNamesTrigger/run.ps1
new file mode 100644
index 000000000..f384f74dc
--- /dev/null
+++ b/test/Integration/test-powershell/ReservedPrimaryKeyColumnNamesTrigger/run.ps1
@@ -0,0 +1,8 @@
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+
+using namespace System.Net
+
+param($changes)
+
+throw "Associated test case should fail before the function is invoked."
diff --git a/test/Integration/test-powershell/TableNotPresentTrigger/function.json b/test/Integration/test-powershell/TableNotPresentTrigger/function.json
new file mode 100644
index 000000000..02aa479dc
--- /dev/null
+++ b/test/Integration/test-powershell/TableNotPresentTrigger/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.TableNotPresent",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file
diff --git a/test/Integration/test-powershell/TableNotPresentTrigger/run.ps1 b/test/Integration/test-powershell/TableNotPresentTrigger/run.ps1
new file mode 100644
index 000000000..f384f74dc
--- /dev/null
+++ b/test/Integration/test-powershell/TableNotPresentTrigger/run.ps1
@@ -0,0 +1,8 @@
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+
+using namespace System.Net
+
+param($changes)
+
+throw "Associated test case should fail before the function is invoked."
diff --git a/test/Integration/test-powershell/UnsupportedColumnTypesTrigger/function.json b/test/Integration/test-powershell/UnsupportedColumnTypesTrigger/function.json
new file mode 100644
index 000000000..eafe762f1
--- /dev/null
+++ b/test/Integration/test-powershell/UnsupportedColumnTypesTrigger/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.ProductsWithUnsupportedColumnTypes",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file
diff --git a/test/Integration/test-powershell/UnsupportedColumnTypesTrigger/run.ps1 b/test/Integration/test-powershell/UnsupportedColumnTypesTrigger/run.ps1
new file mode 100644
index 000000000..f384f74dc
--- /dev/null
+++ b/test/Integration/test-powershell/UnsupportedColumnTypesTrigger/run.ps1
@@ -0,0 +1,8 @@
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+
+using namespace System.Net
+
+param($changes)
+
+throw "Associated test case should fail before the function is invoked."
diff --git a/test/Integration/test-python/MultiFunctionTrigger1/__init__.py b/test/Integration/test-python/MultiFunctionTrigger1/__init__.py
new file mode 100644
index 000000000..c3b2aaf70
--- /dev/null
+++ b/test/Integration/test-python/MultiFunctionTrigger1/__init__.py
@@ -0,0 +1,8 @@
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License.
+
+import json
+import logging
+
+def main(changes):
+ logging.info("Trigger1 Changes: %s", json.loads(changes))
diff --git a/test/Integration/test-python/MultiFunctionTrigger1/function.json b/test/Integration/test-python/MultiFunctionTrigger1/function.json
new file mode 100644
index 000000000..e277c5e39
--- /dev/null
+++ b/test/Integration/test-python/MultiFunctionTrigger1/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.Products",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file
diff --git a/test/Integration/test-python/MultiFunctionTrigger2/__init__.py b/test/Integration/test-python/MultiFunctionTrigger2/__init__.py
new file mode 100644
index 000000000..7db5ad33b
--- /dev/null
+++ b/test/Integration/test-python/MultiFunctionTrigger2/__init__.py
@@ -0,0 +1,8 @@
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License.
+
+import json
+import logging
+
+def main(changes):
+ logging.info("Trigger2 Changes: %s", json.loads(changes))
diff --git a/test/Integration/test-python/MultiFunctionTrigger2/function.json b/test/Integration/test-python/MultiFunctionTrigger2/function.json
new file mode 100644
index 000000000..e277c5e39
--- /dev/null
+++ b/test/Integration/test-python/MultiFunctionTrigger2/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.Products",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file
diff --git a/test/Integration/test-python/PrimaryKeyNotPresentTrigger/__init__.py b/test/Integration/test-python/PrimaryKeyNotPresentTrigger/__init__.py
new file mode 100644
index 000000000..72ea78aad
--- /dev/null
+++ b/test/Integration/test-python/PrimaryKeyNotPresentTrigger/__init__.py
@@ -0,0 +1,5 @@
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License.
+
+def main(changes):
+ raise Exception("Associated test case should fail before the function is invoked.")
\ No newline at end of file
diff --git a/test/Integration/test-python/PrimaryKeyNotPresentTrigger/function.json b/test/Integration/test-python/PrimaryKeyNotPresentTrigger/function.json
new file mode 100644
index 000000000..4c8d6d04c
--- /dev/null
+++ b/test/Integration/test-python/PrimaryKeyNotPresentTrigger/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.ProductsWithoutPrimaryKey",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file
diff --git a/test/Integration/test-python/ReservedPrimaryKeyColumnNamesTrigger/__init__.py b/test/Integration/test-python/ReservedPrimaryKeyColumnNamesTrigger/__init__.py
new file mode 100644
index 000000000..72ea78aad
--- /dev/null
+++ b/test/Integration/test-python/ReservedPrimaryKeyColumnNamesTrigger/__init__.py
@@ -0,0 +1,5 @@
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License.
+
+def main(changes):
+ raise Exception("Associated test case should fail before the function is invoked.")
\ No newline at end of file
diff --git a/test/Integration/test-python/ReservedPrimaryKeyColumnNamesTrigger/function.json b/test/Integration/test-python/ReservedPrimaryKeyColumnNamesTrigger/function.json
new file mode 100644
index 000000000..a6958d8cc
--- /dev/null
+++ b/test/Integration/test-python/ReservedPrimaryKeyColumnNamesTrigger/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.ProductsWithReservedPrimaryKeyColumnNames",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file
diff --git a/test/Integration/test-python/TableNotPresentTrigger/__init__.py b/test/Integration/test-python/TableNotPresentTrigger/__init__.py
new file mode 100644
index 000000000..72ea78aad
--- /dev/null
+++ b/test/Integration/test-python/TableNotPresentTrigger/__init__.py
@@ -0,0 +1,5 @@
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License.
+
+def main(changes):
+ raise Exception("Associated test case should fail before the function is invoked.")
\ No newline at end of file
diff --git a/test/Integration/test-python/TableNotPresentTrigger/function.json b/test/Integration/test-python/TableNotPresentTrigger/function.json
new file mode 100644
index 000000000..02aa479dc
--- /dev/null
+++ b/test/Integration/test-python/TableNotPresentTrigger/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.TableNotPresent",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file
diff --git a/test/Integration/test-python/UnsupportedColumnTypesTrigger/__init__.py b/test/Integration/test-python/UnsupportedColumnTypesTrigger/__init__.py
new file mode 100644
index 000000000..72ea78aad
--- /dev/null
+++ b/test/Integration/test-python/UnsupportedColumnTypesTrigger/__init__.py
@@ -0,0 +1,5 @@
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License.
+
+def main(changes):
+ raise Exception("Associated test case should fail before the function is invoked.")
\ No newline at end of file
diff --git a/test/Integration/test-python/UnsupportedColumnTypesTrigger/function.json b/test/Integration/test-python/UnsupportedColumnTypesTrigger/function.json
new file mode 100644
index 000000000..eafe762f1
--- /dev/null
+++ b/test/Integration/test-python/UnsupportedColumnTypesTrigger/function.json
@@ -0,0 +1,12 @@
+{
+ "bindings": [
+ {
+ "name": "changes",
+ "type": "sqlTrigger",
+ "direction": "in",
+ "tableName": "dbo.ProductsWithUnsupportedColumnTypes",
+ "connectionStringSetting": "SqlConnectionString"
+ }
+ ],
+ "disabled": false
+ }
\ No newline at end of file