Skip to content
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

Split create_basic_client into two methods #14673

Merged
merged 26 commits into from
Nov 3, 2020
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a8a078f
Update azure_testcase.py
lmazuel Oct 21, 2020
52c9b1c
updated test_table(_async) to verify changes to azure_testcase work n…
seankane-msft Oct 21, 2020
2ba457e
removed the positional *args in favor of pushing towards kwargs
seankane-msft Oct 21, 2020
4ab4cd3
added private _get_real_credential with kwarg for is_async
seankane-msft Oct 21, 2020
cd97f09
added the async fake credential that was copied from schema registry,…
seankane-msft Oct 21, 2020
07eb9de
breaking the fake async credential into its own file and importing it…
seankane-msft Oct 21, 2020
7e110aa
fixing up comments based on laurent/adams review
seankane-msft Oct 22, 2020
65bea77
removing the second boolean for is_real, using self.is_live instead w…
seankane-msft Oct 22, 2020
4360a14
updating credential to be self.xxx_cred, caught in the tables live tests
seankane-msft Oct 27, 2020
dd71477
fixed a create_credential in test table async that did not use kwargs…
seankane-msft Oct 27, 2020
f8e9a4f
Update azure_testcase.py
lmazuel Oct 21, 2020
a2e467a
updated test_table(_async) to verify changes to azure_testcase work n…
seankane-msft Oct 21, 2020
b7bd954
removed the positional *args in favor of pushing towards kwargs
seankane-msft Oct 21, 2020
5cfc599
added private _get_real_credential with kwarg for is_async
seankane-msft Oct 21, 2020
fa30004
added the async fake credential that was copied from schema registry,…
seankane-msft Oct 21, 2020
2a034ab
breaking the fake async credential into its own file and importing it…
seankane-msft Oct 21, 2020
56c60da
fixing up comments based on laurent/adams review
seankane-msft Oct 22, 2020
61592b5
removing the second boolean for is_real, using self.is_live instead w…
seankane-msft Oct 22, 2020
0a72499
updating credential to be self.xxx_cred, caught in the tables live tests
seankane-msft Oct 27, 2020
c9b74d8
fixed a create_credential in test table async that did not use kwargs…
seankane-msft Oct 27, 2020
1b79c34
changing a word to force check-enforcer to re-evaulate CI
seankane-msft Nov 2, 2020
9b68e71
changing a word to force check-enforcer to re-evaulate CI
seankane-msft Nov 2, 2020
69c5dee
Merge remote-tracking branch 'origin/master' into async_cred_test
lmazuel Nov 3, 2020
208b6a3
Clarify async protocol
lmazuel Nov 3, 2020
ac5ce2f
adding a logging message to warn about create_basic_client and use ge…
seankane-msft Nov 3, 2020
ec9b9f0
fixing up the syntax of the logger
seankane-msft Nov 3, 2020
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
Prev Previous commit
Next Next commit
removing the second boolean for is_real, using self.is_live instead w…
…hich does the same thing
seankane-msft committed Nov 2, 2020
commit 61592b581aed719130b8eb143dffb48cb92bc1ff
8 changes: 4 additions & 4 deletions tools/azure-sdk-tools/devtools_testutils/azure_testcase.py
Original file line number Diff line number Diff line change
@@ -189,8 +189,8 @@ def setUp(self):
def tearDown(self):
return super(AzureTestCase, self).tearDown()

def _get_credential(self, is_async, is_real):
if is_real:
def _get_credential(self, is_async):
if self.is_live:
from azure.identity import ClientSecretCredential
if is_async:
from azure.identity.aio import ClientSecretCredential
@@ -214,7 +214,7 @@ def get_credential(self, client_class, **kwargs):
if self.tenant_id and self.client_id and self.secret and self.is_live:
if _is_autorest_v3(client_class):
# Create azure-identity class
return self._get_credential(is_async=is_async, is_real=True)
return self._get_credential(is_async=is_async)
else:
# Create msrestazure class
from msrestazure.azure_active_directory import ServicePrincipalCredentials
@@ -225,7 +225,7 @@ def get_credential(self, client_class, **kwargs):
)
else:
if _is_autorest_v3(client_class):
return self._get_credential(is_async, is_real=False)
return self._get_credential(is_async)
else:
return self.settings.get_credentials()