Skip to content

Commit db431bc

Browse files
Ace Nassriiennae
Ace Nassri
andauthored
fix(functions): add 2nd-gen cloudevent tags (GoogleCloudPlatform#1678)
* fix(functions): add 2nd-gen cloudevent tags * Update pub/sub unit test * Update storage function * Update storage unit test * Typo * Typo 2 Co-authored-by: Jennifer Davis
1 parent ef403b5 commit db431bc

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

functions/helloworld_pubsub/SampleUnitTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
declare(strict_types=1);
2020

21+
// [START functions_cloudevent_pubsub_unit_test]
2122
// [START functions_pubsub_unit_test]
2223

2324
namespace Google\Cloud\Samples\Functions\HelloworldPubsub\Test;
@@ -82,4 +83,5 @@ public function testFunction(
8283
}
8384
}
8485

86+
// [END functions_cloudevent_pubsub_unit_test]
8587
// [END functions_pubsub_unit_test]

functions/helloworld_pubsub/index.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* limitations under the License.
1717
*/
1818

19+
// [START functions_cloudevent_pubsub]
1920
// [START functions_helloworld_pubsub]
2021

2122
use CloudEvents\V1\CloudEventInterface;
@@ -38,3 +39,4 @@ function helloworldPubsub(CloudEventInterface $event): void
3839
fwrite($log, "Hello, $name!" . PHP_EOL);
3940
}
4041
// [END functions_helloworld_pubsub]
42+
// [END functions_cloudevent_pubsub]

functions/helloworld_storage/SampleUnitTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
declare(strict_types=1);
2020

2121
// [START functions_storage_unit_test]
22+
// [START functions_cloudevent_storage_unit_test]
2223

2324
namespace Google\Cloud\Samples\Functions\HelloworldStorage\Test;
2425

@@ -89,4 +90,5 @@ public function testFunction(CloudEventInterface $cloudevent): void
8990
}
9091
}
9192

93+
// [END functions_cloudevent_storage_unit_test]
9294
// [END functions_storage_unit_test]

functions/helloworld_storage/index.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* limitations under the License.
1717
*/
1818

19+
// [START functions_cloudevent_storage]
1920
// [START functions_helloworld_storage]
2021

2122
use CloudEvents\V1\CloudEventInterface;
@@ -41,4 +42,5 @@ function helloGCS(CloudEventInterface $cloudevent)
4142
fwrite($log, 'Updated: ' . $data['updated'] . PHP_EOL);
4243
}
4344

45+
// [END functions_cloudevent_storage]
4446
// [END functions_helloworld_storage]

0 commit comments

Comments
 (0)