Add VisualStudioCodeCredential#10979
Conversation
- Remove unused code from VisualStudioCodeCredential
| { | ||
| internal static class StaticCachesUtilities | ||
| { | ||
| private static readonly Lazy<Action> s_clearStaticMetadataProvider = new Lazy<Action>(() => |
There was a problem hiding this comment.
Is compiling to expressions here worth it?
| public void Dispose() => WindowsNativeMethods.CredDelete(_target, WindowsNativeMethods.CRED_TYPE.GENERIC); | ||
| } | ||
|
|
||
| private sealed class OsxRefreshTokenFixture : IDisposable |
|
|
||
| public VisualStudioCodeCredentialLiveTests(bool isAsync) : base(isAsync) | ||
| { | ||
| Matcher.ExcludeHeaders.Add("Content-Length"); |
There was a problem hiding this comment.
For curiosity sake why are we excluding content length?
There was a problem hiding this comment.
IdentityRecordedTestSanitizer changes request body, so computed "Content-Length" will be incorrect.
There was a problem hiding this comment.
There was a problem hiding this comment.
In theory it should just work, can you debug and see why that codepaths is not getting hit?
There was a problem hiding this comment.
The identity tests have their own sanitizer, and it should update Content-Length as well.
If we can't figure out why we still need to omit this from the matcher let's not block merging this. Just file an issue to investigate.
There was a problem hiding this comment.
Error looks like this:
Header differences:
<Content-Length> values differ, request <181>, record <9>
So it is playback Content-Length that isn't sanitized.
|
Great job adding test coverage to this not-so-easy-to-cover feature 👍 |
- On Linux, disable tests that require Libsecret
| { | ||
| internal sealed class LinuxVisualStudioCodeAdapter : IVisualStudioCodeAdapter | ||
| { | ||
| private static readonly string s_userSettingsJsonPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Code", "User", "settings.json"); |
There was a problem hiding this comment.
Seem like settings on Linux is under $HOME/.config/Code/User/settings.json.
See https://vscode.readthedocs.io/en/latest/getstarted/settings/
No description provided.