-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add SLCore credentials provider implementation #5206
Add SLCore credentials provider implementation #5206
Conversation
[PartCreationPolicy(CreationPolicy.Shared)] | ||
internal class CredentialsListener : ICredentialsListener | ||
{ | ||
private static readonly Uri SonarCloudUri = new Uri("https://sonarcloud.io"); |
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.
We don't have a single source of truth type of place for this URL. Should we open a ticket for that? To refactor the code and move all redeclarations of this URL to a single place?
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.
yeah it makes sense
const string password = "password123"; | ||
|
||
var testSubject = CreateTestSubject(out var credentialStoreMock); | ||
credentialStoreMock.Setup(x => x.ReadCredentials(It.Is((TargetUri uri) => UriEquals(uri, SonarCloudUri)))).Returns(new Credential(username, password)); |
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.
you can put SonarCloudUri as a method parameter without using It.Is for setup which would make it simpler. (no need to change)
Quality Gate passedIssues Measures |
6a8a0b5
into
feature/sloop-rule-meta-data
Fixes #5204