Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions compute/oslogin/service_account_ssh_test.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Copyright 2019, Google, Inc.
Comment thread
m-strzelczyk marked this conversation as resolved.
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand Down Expand Up @@ -112,6 +113,10 @@ def setup_resources(
'accountId': test_id
}).execute()

# Wait for the creation to propagate through the system, so the
# following calls don't fail sometimes.
time.sleep(5)

# Grant the service account access to itself.
iam.projects().serviceAccounts().setIamPolicy(
resource='projects/' + project + '/serviceAccounts/' + account_email,
Expand Down