move remaining smoketest files out of samples folder (this branch was open a long time ago and the new files were missed in a rebase)
add remaining KV smoke tests back in add to requirements allow for other versions of python 3.7 update to use older interfaces fix up smoke tests for september 2019 preview name the matrix entry properly do not wait for cert creation in b3
This commit is contained in:
Родитель
94f7022f82
Коммит
e8993089a8
|
@ -22,13 +22,14 @@ class KeyVaultCertificates:
|
|||
self.certificate_name = "cert-name-" + uuid.uuid1().hex
|
||||
|
||||
def create_certificate(self):
|
||||
self.certificate_client.begin_create_certificate(name=self.certificate_name, policy=CertificatePolicy.get_default()).wait()
|
||||
print("creating certificate...")
|
||||
self.certificate_client.create_certificate(name=self.certificate_name)
|
||||
print("\tdone")
|
||||
|
||||
def get_certificate(self):
|
||||
print("Getting a certificate...")
|
||||
certificate = self.certificate_client.get_certificate(name=self.certificate_name)
|
||||
print(f"\tdone, certificate: {certificate.name}.")
|
||||
certificate = self.certificate_client.get_certificate_with_policy(name=self.certificate_name)
|
||||
print("\tdone, certificate: %s." % certificate.name)
|
||||
|
||||
def delete_certificate(self):
|
||||
print("Deleting a certificate...")
|
|
@ -23,12 +23,13 @@ class KeyVaultCertificates:
|
|||
self.certificate_name = "cert-name-" + uuid.uuid1().hex
|
||||
|
||||
async def create_certificate(self):
|
||||
await self.certificate_client.create_certificate(name=self.certificate_name, policy=CertificatePolicy.get_default())
|
||||
create_certificate_poller = await self.certificate_client.create_certificate(name=self.certificate_name)
|
||||
await create_certificate_poller
|
||||
print("\tdone")
|
||||
|
||||
async def get_certificate(self):
|
||||
print("Getting a certificate...")
|
||||
certificate = await self.certificate_client.get_certificate(name=self.certificate_name)
|
||||
certificate = await self.certificate_client.get_certificate_with_policy(name=self.certificate_name)
|
||||
print(f"\tdone, certificate: {certificate.name}.")
|
||||
|
||||
async def delete_certificate(self):
|
|
@ -23,17 +23,17 @@ class KeyVaultKeys:
|
|||
|
||||
def create_rsa_key(self):
|
||||
print("Creating an RSA key...")
|
||||
self.key_client.create_rsa_key(name=self.key_name, size=2048)
|
||||
self.key_client.create_rsa_key(name=self.key_name, size=2048, hsm=False)
|
||||
print("\tdone")
|
||||
|
||||
def get_key(self):
|
||||
print("Getting a key...")
|
||||
key = self.key_client.get_key(name=self.key_name)
|
||||
print(f"\tdone, key: {key.name}.")
|
||||
print("\tdone, key: %s." % key.name)
|
||||
|
||||
def delete_key(self):
|
||||
print("Deleting a key...")
|
||||
deleted_key = self.key_client.begin_delete_key(name=self.key_name).result()
|
||||
deleted_key = self.key_client.delete_key(name=self.key_name)
|
||||
print("\tdone: " + deleted_key.name)
|
||||
|
||||
def run(self):
|
|
@ -23,7 +23,7 @@ class KeyVaultKeys:
|
|||
|
||||
async def create_rsa_key(self):
|
||||
print("Creating an RSA key...")
|
||||
await self.key_client.create_rsa_key(name=self.key_name, size=2048)
|
||||
await self.key_client.create_rsa_key(name=self.key_name, size=2048, hsm=False)
|
||||
print("\tdone")
|
||||
|
||||
async def get_key(self):
|
|
@ -2,8 +2,12 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
# ------------------------------------
|
||||
import logging
|
||||
logging.basicConfig()
|
||||
|
||||
import smoke_test
|
||||
|
||||
|
||||
try:
|
||||
import smoke_test_async
|
||||
except SyntaxError:
|
||||
|
|
|
@ -3,6 +3,8 @@ azure-core==1.0.0b3
|
|||
azure-cosmos==4.0.0b2
|
||||
azure-eventhub==5.0.0b3
|
||||
azure-identity==1.0.0b3
|
||||
azure-keyvault-certificates==4.0.0b3
|
||||
azure-keyvault-keys==4.0.0b3
|
||||
azure-keyvault-secrets==4.0.0b3
|
||||
azure-storage-blob==12.0.0b3
|
||||
azure-storage-common==2.1.0
|
|
@ -2,6 +2,8 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
# ------------------------------------
|
||||
from key_vault_certificates import KeyVaultCertificates
|
||||
from key_vault_keys import KeyVaultKeys
|
||||
from key_vault_secrets import KeyVaultSecrets
|
||||
from storage_blob import StorageBlob
|
||||
from event_hubs import EventHub
|
||||
|
@ -12,6 +14,8 @@ print("==========================================")
|
|||
print(" AZURE TRACK 2 SDKs SMOKE TEST")
|
||||
print("==========================================")
|
||||
|
||||
KeyVaultCertificates().run()
|
||||
KeyVaultKeys().run()
|
||||
KeyVaultSecrets().run()
|
||||
StorageBlob().run()
|
||||
EventHub().run()
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
# Licensed under the MIT License.
|
||||
# ------------------------------------
|
||||
import asyncio
|
||||
from key_vault_certificates_async import KeyVaultCertificates
|
||||
from key_vault_keys_async import KeyVaultKeys
|
||||
from key_vault_secrets_async import KeyVaultSecrets
|
||||
from event_hubs_async import EventHub
|
||||
|
||||
|
@ -13,6 +15,8 @@ print("==========================================")
|
|||
|
||||
|
||||
async def main():
|
||||
await KeyVaultCertificates().run()
|
||||
await KeyVaultKeys().run()
|
||||
await KeyVaultSecrets().run()
|
||||
await EventHub().run()
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ jobs:
|
|||
- job:
|
||||
strategy:
|
||||
matrix:
|
||||
Python_374:
|
||||
PythonVersion: '3.7.4'
|
||||
Python_37:
|
||||
PythonVersion: '3.7'
|
||||
Python_27:
|
||||
PythonVersion: '2.7'
|
||||
InstallAsyncRequirements: false
|
||||
|
|
Загрузка…
Ссылка в новой задаче