-
Notifications
You must be signed in to change notification settings - Fork 478
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
Allow the user to specify a tenant when acquiring a token to talk to … #1576
Conversation
Pull Request Test Coverage Report for Build 52808
💛 - Coveralls |
libraries/Microsoft.Bot.Connector/Authentication/MicrosoftAppCredentials.cs
Outdated
Show resolved
Hide resolved
libraries/Microsoft.Bot.Connector/Authentication/MicrosoftAppCredentials.cs
Outdated
Show resolved
Hide resolved
libraries/Microsoft.Bot.Connector/Authentication/MicrosoftAppCredentials.cs
Show resolved
Hide resolved
libraries/Microsoft.Bot.Connector/Authentication/MicrosoftAppCredentials.cs
Outdated
Show resolved
Hide resolved
[Fact] | ||
public async Task TokenTests_GetCredentialsFromTenantWorks() | ||
{ | ||
MicrosoftAppCredentials credentials = new MicrosoftAppCredentials("645cd89f-a83e-4af9-abb5-a454e917cbc4", "jvoMWRBA67:zjgePZ359_-_", "microsoft.com", null); |
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.
2 things here:
-
We cannot put magic keys / constants in code. If we did this, the keys needs to be stored as encrypted variables in Azure Devops and passed into the build via ENV variables. (This is a super-common pattern).
-
We cannot put actual "Service" tests here. These are unit tests, and cannot hit actual services.
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.
this is how tests are written in this file. I'm copying the existing pattern.
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.
Alright, I'll clean this up seperatly.
…the BF connectors