mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
* CredentialService initial impl with Win32 support - Basic CredentialService APIs for Save, Read, Delete - E2E unit tests for Credential Service - Win32 implementation with unit tests * Save Password support on Mac v1 - Basic keychain support on Mac using Interop with the KeyChain APIs - All but 1 unit test passing. This will pass once API is changed, but checking this in with the existing API so that if we decide to alter behavior, we have a reference point. * Remove Username from Credentials API - Removed Username option from Credentials as this caused conflicting behavior on Mac vs Windows * Cleanup Using Statements and add Copyright * Linux CredentialStore Prototype * Linux credential store support - Full support for Linux credential store with tests * Plumbed CredentialService into Program init * Addressing Pull Request comments
38 lines
946 B
C#
38 lines
946 B
C#
//
|
|
// Copyright (c) Microsoft. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
//
|
|
|
|
using Microsoft.SqlTools.ServiceLayer.Credentials;
|
|
using Microsoft.SqlTools.ServiceLayer.Credentials.Linux;
|
|
using Microsoft.SqlTools.ServiceLayer.Test.Utility;
|
|
using Xunit;
|
|
|
|
namespace Microsoft.SqlTools.ServiceLayer.Test.Credentials
|
|
{
|
|
public class LinuxInteropTests
|
|
{
|
|
[Fact]
|
|
public void GetEUidReturnsInt()
|
|
{
|
|
TestUtils.RunIfLinux(() =>
|
|
{
|
|
Assert.NotNull(Interop.Sys.GetEUid());
|
|
});
|
|
}
|
|
|
|
[Fact]
|
|
public void GetHomeDirectoryFromPwFindsHomeDir()
|
|
{
|
|
|
|
TestUtils.RunIfLinux(() =>
|
|
{
|
|
string userDir = LinuxCredentialStore.GetHomeDirectoryFromPw();
|
|
Assert.StartsWith("/", userDir);
|
|
});
|
|
}
|
|
|
|
}
|
|
}
|
|
|