diff --git a/packages/google-cloud-kms/samples/snippets/snippets_test.py b/packages/google-cloud-kms/samples/snippets/snippets_test.py index e4deda1c1280..2ea0b12c3a54 100644 --- a/packages/google-cloud-kms/samples/snippets/snippets_test.py +++ b/packages/google-cloud-kms/samples/snippets/snippets_test.py @@ -13,6 +13,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and +import random +import string + from googleapiclient import discovery import snippets @@ -22,10 +25,12 @@ LOCATION = 'global' # Your Google Cloud Platform KeyRing name -KEYRING = 'sample-keyring-43' +KEYRING = ''.join( + random.choice(string.ascii_lowercase + string.digits) for _ in range(12)) # Your Google Cloud Platform CryptoKey name -CRYPTOKEY = 'sample-key-43' +CRYPTOKEY = ''.join( + random.choice(string.ascii_lowercase + string.digits) for _ in range(12)) # Your Google Cloud Platform CryptoKeyVersion name VERSION = 1