summaryrefslogtreecommitdiffstats
path: root/ansible_collections/google/cloud/test-fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/google/cloud/test-fixtures')
-rwxr-xr-xansible_collections/google/cloud/test-fixtures/cloud-function-source/build-function-zip.sh7
-rw-r--r--ansible_collections/google/cloud/test-fixtures/cloud-function-source/main.py10
-rw-r--r--ansible_collections/google/cloud/test-fixtures/cloud-function-source/requirements.txt1
-rw-r--r--ansible_collections/google/cloud/test-fixtures/cloud-function.zipbin0 -> 776 bytes
4 files changed, 18 insertions, 0 deletions
diff --git a/ansible_collections/google/cloud/test-fixtures/cloud-function-source/build-function-zip.sh b/ansible_collections/google/cloud/test-fixtures/cloud-function-source/build-function-zip.sh
new file mode 100755
index 000000000..2ff25776b
--- /dev/null
+++ b/ansible_collections/google/cloud/test-fixtures/cloud-function-source/build-function-zip.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+# Build the cloud function zip file,
+# in the desired cloud function source format.
+if [ -f ../cloud-function.zip ]; then
+ rm ../cloud-function.zip
+fi
+zip ../cloud-function.zip ./* \ No newline at end of file
diff --git a/ansible_collections/google/cloud/test-fixtures/cloud-function-source/main.py b/ansible_collections/google/cloud/test-fixtures/cloud-function-source/main.py
new file mode 100644
index 000000000..2578c4185
--- /dev/null
+++ b/ansible_collections/google/cloud/test-fixtures/cloud-function-source/main.py
@@ -0,0 +1,10 @@
+import functions_framework
+
+
+# Register an HTTP function with the Functions Framework
+@functions_framework.http
+def helloGET(request):
+ # Your code here
+
+ # Return an HTTP response
+ return "OK"
diff --git a/ansible_collections/google/cloud/test-fixtures/cloud-function-source/requirements.txt b/ansible_collections/google/cloud/test-fixtures/cloud-function-source/requirements.txt
new file mode 100644
index 000000000..a675cdd56
--- /dev/null
+++ b/ansible_collections/google/cloud/test-fixtures/cloud-function-source/requirements.txt
@@ -0,0 +1 @@
+functions-framework==3.*
diff --git a/ansible_collections/google/cloud/test-fixtures/cloud-function.zip b/ansible_collections/google/cloud/test-fixtures/cloud-function.zip
new file mode 100644
index 000000000..8d3d090ea
--- /dev/null
+++ b/ansible_collections/google/cloud/test-fixtures/cloud-function.zip
Binary files differ