Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
path: bin

- name: 🧪 test
run: dotnet test -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" --nologo -bl --logger:"console;verbosity=normal" -p:VSTestVerbosity=detailed
run: dotnet test -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" --nologo -bl -l:"console;verbosity=normal"

- name: 🐛 logs
uses: actions/upload-artifact@v3
Expand Down
9 changes: 9 additions & 0 deletions src/Tests/Attributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,12 @@ public class LinuxTheoryAttribute() : OSTheoryAttribute(OSPlatform.Linux);
public class macOSTheoryAttribute() : OSTheoryAttribute(OSPlatform.OSX);

public class UnixTheoryAttribute() : OSTheoryAttribute(OSPlatform.Linux, OSPlatform.OSX);

public class LocalFactAttribute : OSFactAttribute
{
public LocalFactAttribute(params string[] onPlatforms) : base(onPlatforms)
{
if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("CI")))
Skip = "Local-only test";
}
}
18 changes: 18 additions & 0 deletions src/Tests/EndToEnd.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,24 @@ public void GitCacheStore()
Run();
}

[LocalFact(nameof(OSPlatform.Linux))]
public void LinuxSecretService()
{
// To test this locally, you need:
// sudo apt-get update
// sudo apt install libsecret-1-0 libsecret-1-dev
// sudo apt install gnome-keyring
// dbus-launch --sh-syntax
// export $(dbus-launch)
// gnome-keyring-daemon -r -d

// Then run the tests: dotnet test
// This will require keyring unlocking interactively before tests proceed.

Environment.SetEnvironmentVariable("GCM_CREDENTIAL_STORE", "secretservice");
Run();
}

void Run()
{
var store = CredentialManager.Create(Guid.NewGuid().ToString("N"));
Expand Down