-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add system tests for bucket notifications. #4021
Add system tests for bucket notifications. #4021
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No real complaints here
@@ -71,10 +71,11 @@ def system_tests(session, python_version): | |||
# virutalenv's dist-packages. | |||
session.install('mock', 'pytest', *LOCAL_DEPS) | |||
session.install('../test_utils/') | |||
session.install('.') | |||
session.install('../pubsub') | |||
session.install('-e', '.') |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
with Config.CLIENT.batch(): | ||
for bucket_name in self.case_buckets_to_delete: | ||
bucket = Config.CLIENT.bucket(bucket_name) | ||
retry_429(bucket.delete)() |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
self.assertEqual(len(notifications), 1) | ||
self.assertEqual(notifications[0].topic_name, self.TOPIC_NAME) | ||
finally: | ||
notification.delete() |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
storage/tests/system.py
Outdated
self.assertIsNotNone(notification.id) | ||
notifications = list(bucket.list_notifications()) | ||
self.assertEqual(len(notifications), 1) | ||
self.assertEqual(notifications[0].topic_name, self.TOPIC_NAME) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Branch build with new system tests passes the storage system tests. CircleCI failures are unrelated vision flakiness (#4035) |
9eb9a46
to
352aeed
Compare
Default it to 'NONE'.
N.B.: the tests currently fail with a 403.
The back-end uses 'object_name_prefix'.
I rebased the target branch against |
policy = self.publisher_client.get_iam_policy(self.topic_path) | ||
binding = policy.bindings.add() | ||
binding.role = 'roles/pubsub.publisher' | ||
binding.members.append( |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
N.B.: the tests currently fail with a 403:
See
#3956https://github.com/GoogleCloudPlatform/google-cloud-common/issues/231 where I ask for help on that issue.