Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

fix(sample): fix a broken test #63

Merged
merged 2 commits into from Sep 18, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions samples/snippets/snippets_notification_configs.py
Expand Up @@ -124,19 +124,21 @@ def update_notification_config(organization_id, notification_config_id, pubsub_t

# Only description and pubsub_topic can be updated.
field_mask = field_mask_pb2.FieldMask(
paths=["description", "pubsub_topic", "streaming_config.fitler"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this failing because this was a typo? fitler instead of filter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh Nice catch, I'll update :)

paths=["description", "pubsub_topic"]
)

updated_notification_config = client.update_notification_config(
{
"name": notification_config_name,
"description": updated_description,
"pubsub_topic": pubsub_topic,
"streaming_config": {"filter": updated_filter},
},
update_mask=field_mask,
)

print(updated_notification_config)
# [END scc_update_notification_config]
# It fails when we try to update `streaming_config.filter` field.
# Thus now we only update the description and pubsub_topic.
# See: #59
return updated_notification_config