Public Access
Add the encrypted local cache and the sync client
Three new client projects, and the wire-contract fix they needed. DodoSSH.Client.Domain holds the decrypted item model and the three-way merge, with no I/O at all — so the suite that decides whether a credential can be lost runs in milliseconds with nothing to mock. Scalars defer to the server on a genuine clash so every replica resolves the same triple identically and two clients cannot ping-pong; directives merge per name so two people each adding one both keep theirs; the jump chain merges as a whole value because its order is the route. Whatever loses is returned rather than dropped. DodoSSH.Client.Storage is EF Core on SQLite, no SQLCipher: the rows are already ciphertext, so an encrypted file would protect protected bytes at the cost of a native dependency. It keeps the server's state and the outbox in separate tables, which is what preserves the common ancestor a merge needs. One pending operation per item, enforced by a unique index. DodoSSH.Client.Sync is the pull/apply/push loop. Pulling never decrypts — a change with no local work pending is plumbed as ciphertext — so a first sync of thousands of items does not run twice as many AEAD operations for nothing. Contracts: EncryptedPayload gains WrappedDataKey and DataKeyId. The specification has required a per-item data key since crypto.md §3, the columns have existed since the first migration and DshAad.ItemPayload binds the id, but this record had nowhere to put either — so a spec-compliant item could not be transmitted at all. Found by writing the client that has to produce one. Also closes a hole in AadResourceType, which had no value for the HostTag and HostCredential that SyncEntityType has always listed. Four bugs the tests found, not review: - SQLite refuses to order or compare its own DateTimeOffset mapping, and throws at execution rather than model build. Collecting tombstones and listing conflicts are both that shape, so this was a crash waiting for the first user with a deleted host. Timestamps are integers now, by convention so a later field cannot be the one left unconverted. - SQLitePCLRaw 2.1.11, which EF resolves, is covered by GHSA-2m69-gcr7-jv3q. Pinned forward as a family. - Resurrecting content from a remote deletion cleared the original before queueing the copy. Two transactions, so a crash between them lost the work; reversed, and the rescued id is derived from the tombstone so a replay coalesces instead of duplicating. - Several equality assertions went through Shouldly's ShouldBe, which compares IEnumerable element-wise and so tested nothing about the Equals these types exist to provide. Corrected; the falsification that caught it went from 2 failures to 6. The push response's cursor is deliberately ignored. It sits after this client's own writes, so adopting it skips anything another client committed at a lower sequence in the window between a pull and a push — permanently. Re-reading one's own writes is idempotent and costs a page. The Contracts doc that invited the shortcut now says so. 593 tests, up from 448. The delete-versus-edit rules, the ancestor retention, the fresh operation id on coalesce and the cursor safeguard were each verified by breaking them and watching the right test fail.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<!--
|
||||
The merge rules, in isolation. No ciphertext, no database, no HTTP — which is the point of
|
||||
keeping the item model in its own dependency-free project: the suite that decides whether a
|
||||
credential can be lost runs in milliseconds and has nothing to mock.
|
||||
-->
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../../src/DodoSSH.Client.Domain/DodoSSH.Client.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,32 @@
|
||||
namespace DodoSSH.Client.Domain.Tests;
|
||||
|
||||
/// <summary>Builds hosts for the suites, so each test varies only what it is about.</summary>
|
||||
internal static class HostFactory
|
||||
{
|
||||
internal static Guid Bastion { get; } = Guid.Parse("0192f0c8-1111-7c3d-8e4f-5a6b7c8d9e01");
|
||||
|
||||
internal static Guid Relay { get; } = Guid.Parse("0192f0c8-2222-7c3d-8e4f-5a6b7c8d9e02");
|
||||
|
||||
internal static HostSecret Host(
|
||||
string label = "prod-db",
|
||||
string hostname = "db.internal",
|
||||
int port = 22,
|
||||
string? username = "deploy",
|
||||
string? notes = null,
|
||||
Guid[]? jumps = null,
|
||||
(string Name, string Value)[]? options = null,
|
||||
bool relayEnabled = false) =>
|
||||
new()
|
||||
{
|
||||
Label = label,
|
||||
Hostname = hostname,
|
||||
Port = port,
|
||||
Username = username,
|
||||
Notes = notes,
|
||||
JumpHostIds = jumps is null ? JumpChain.Empty : JumpChain.Create(jumps),
|
||||
Options = options is null
|
||||
? HostOptions.Empty
|
||||
: HostOptions.Create(options.Select(o => new HostOption(o.Name, o.Value))),
|
||||
RelayEnabled = relayEnabled,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
using System.Text;
|
||||
using static DodoSSH.Client.Domain.Tests.HostFactory;
|
||||
|
||||
namespace DodoSSH.Client.Domain.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// The payload encoding.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Two properties carry weight here. Determinism, because the sync engine compares to decide whether
|
||||
/// to push, and a codec that produced different bytes for the same host would make every pass look
|
||||
/// like a change. And failing closed on anything malformed, because these bytes are decrypted inside
|
||||
/// a sync pass where an exception would strand every item queued behind the bad one.
|
||||
/// </remarks>
|
||||
public sealed class HostSecretCodecTests
|
||||
{
|
||||
[Fact]
|
||||
public void AFullHost_RoundTrips()
|
||||
{
|
||||
var host = Host(
|
||||
label: "prod-db",
|
||||
hostname: "db.internal",
|
||||
port: 2222,
|
||||
username: "deploy",
|
||||
notes: "primary replica",
|
||||
jumps: [Bastion, Relay],
|
||||
options: [("ServerAliveInterval", "30"), ("Compression", "yes")]);
|
||||
|
||||
HostSecretCodec.TryDecode(HostSecretCodec.Encode(host), out var document).ShouldBeTrue();
|
||||
|
||||
document.ShouldNotBeNull();
|
||||
document.Host.ShouldBe(host);
|
||||
document.SchemaVersion.ShouldBe(HostSecretCodec.CurrentSchemaVersion);
|
||||
document.IsReadOnly.ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AMinimalHost_RoundTrips()
|
||||
{
|
||||
var host = Host(username: null, notes: null);
|
||||
|
||||
HostSecretCodec.TryDecode(HostSecretCodec.Encode(host), out var document).ShouldBeTrue();
|
||||
|
||||
document!.Host.ShouldBe(host);
|
||||
document.Host.Username.ShouldBeNull();
|
||||
document.Host.Notes.ShouldBeNull();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Encoding_IsDeterministic()
|
||||
{
|
||||
var host = Host(options: [("Compression", "yes"), ("ServerAliveInterval", "30")]);
|
||||
|
||||
HostSecretCodec.Encode(host).ShouldBe(HostSecretCodec.Encode(host));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DirectiveOrder_DoesNotAffectTheEncoding()
|
||||
{
|
||||
// Two clients that agree on the content must produce the same bytes regardless of the order
|
||||
// the user happened to type the directives in.
|
||||
var one = Host(options: [("Compression", "yes"), ("ServerAliveInterval", "30")]);
|
||||
var other = Host(options: [("ServerAliveInterval", "30"), ("Compression", "yes")]);
|
||||
|
||||
HostSecretCodec.Encode(one).ShouldBe(HostSecretCodec.Encode(other));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void APayloadFromANewerSchema_IsReadableButReadOnly()
|
||||
{
|
||||
// The forward-compatibility rule. An old client can show the host but must not re-encode it,
|
||||
// because it has no representation for the newer client's extra fields and would drop them.
|
||||
var payload = Json("""
|
||||
{
|
||||
"schemaVersion": 99,
|
||||
"label": "prod-db",
|
||||
"hostname": "db.internal",
|
||||
"port": 22,
|
||||
"unknownFutureField": { "nested": true }
|
||||
}
|
||||
""");
|
||||
|
||||
HostSecretCodec.TryDecode(payload, out var document).ShouldBeTrue();
|
||||
|
||||
document!.Host.Label.ShouldBe("prod-db");
|
||||
document.Host.Hostname.ShouldBe("db.internal");
|
||||
document.IsReadOnly.ShouldBeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AnUnknownFieldAtTheCurrentSchema_IsSkippedRatherThanFatal()
|
||||
{
|
||||
var payload = Json("""
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "prod-db",
|
||||
"hostname": "db.internal",
|
||||
"port": 22,
|
||||
"somethingElse": 5
|
||||
}
|
||||
""");
|
||||
|
||||
HostSecretCodec.TryDecode(payload, out var document).ShouldBeTrue();
|
||||
document!.IsReadOnly.ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")]
|
||||
[InlineData("not json at all")]
|
||||
[InlineData("{")]
|
||||
[InlineData("[]")]
|
||||
[InlineData("null")]
|
||||
public void MalformedBytes_ReturnFalseRatherThanThrow(string text)
|
||||
{
|
||||
HostSecretCodec.TryDecode(Json(text), out var document).ShouldBeFalse();
|
||||
document.ShouldBeNull();
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("""{ "schemaVersion": 0, "label": "a", "hostname": "b", "port": 22 }""")]
|
||||
[InlineData("""{ "schemaVersion": -1, "label": "a", "hostname": "b", "port": 22 }""")]
|
||||
[InlineData("""{ "schemaVersion": 1, "label": "", "hostname": "b", "port": 22 }""")]
|
||||
[InlineData("""{ "schemaVersion": 1, "label": "a", "hostname": "", "port": 22 }""")]
|
||||
[InlineData("""{ "schemaVersion": 1, "label": "a", "hostname": "b", "port": 0 }""")]
|
||||
[InlineData("""{ "schemaVersion": 1, "label": "a", "hostname": "b", "port": 70000 }""")]
|
||||
public void AStructurallyInvalidPayload_IsRejected(string json)
|
||||
{
|
||||
HostSecretCodec.TryDecode(Json(json), out _).ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DuplicateDirectiveNamesDifferingOnlyInCase_AreRejected()
|
||||
{
|
||||
// Fails closed. SSH treats keywords case-insensitively, so this payload has no single
|
||||
// meaning; guessing which one wins would make two clients disagree about the same bytes.
|
||||
var payload = Json("""
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "prod-db",
|
||||
"hostname": "db.internal",
|
||||
"port": 22,
|
||||
"options": { "Compression": "yes", "compression": "no" }
|
||||
}
|
||||
""");
|
||||
|
||||
HostSecretCodec.TryDecode(payload, out _).ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AnEmptyJumpHostId_IsRejected()
|
||||
{
|
||||
var payload = Json($$"""
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "prod-db",
|
||||
"hostname": "db.internal",
|
||||
"port": 22,
|
||||
"jumpHostIds": ["{{Guid.Empty}}"]
|
||||
}
|
||||
""");
|
||||
|
||||
HostSecretCodec.TryDecode(payload, out _).ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Encode_RefusesAnInvalidHost()
|
||||
{
|
||||
// Throwing rather than returning false, because unlike decoding, this is a caller bug: the
|
||||
// host came from this process and should have been validated before it got here.
|
||||
Should.Throw<ArgumentException>(() => HostSecretCodec.Encode(Host(label: " ")));
|
||||
Should.Throw<ArgumentException>(() => HostSecretCodec.Encode(Host(port: 0)));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TheEncoding_CarriesNoPlaintextOutsideTheEnvelope()
|
||||
{
|
||||
// A reminder of what this codec is for: every one of these values is inside the ciphertext.
|
||||
// There is no plaintext host label anywhere in the system.
|
||||
var host = Host(label: "prod-db", notes: "root password in 1Password");
|
||||
|
||||
var text = Encoding.UTF8.GetString(HostSecretCodec.Encode(host));
|
||||
|
||||
text.Contains("prod-db", StringComparison.Ordinal).ShouldBeTrue();
|
||||
text.Contains("1Password", StringComparison.Ordinal).ShouldBeTrue();
|
||||
}
|
||||
|
||||
private static byte[] Json(string text) => Encoding.UTF8.GetBytes(text);
|
||||
}
|
||||
@@ -0,0 +1,215 @@
|
||||
using static DodoSSH.Client.Domain.Tests.HostFactory;
|
||||
|
||||
namespace DodoSSH.Client.Domain.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// Merging a host field by field.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The primitives are covered by <see cref="ThreeWayMergeTests"/>; this is about the wiring — that
|
||||
/// every field is actually routed through a merge, that the collections use the right strategy, and
|
||||
/// that a conflict names the field precisely enough for a user to act on it.
|
||||
/// </remarks>
|
||||
public sealed class HostSecretMergeTests
|
||||
{
|
||||
[Fact]
|
||||
public void NeitherSideChanged_ProducesTheSameHostAndNoConflicts()
|
||||
{
|
||||
var host = Host();
|
||||
|
||||
var result = HostSecretMerge.Merge(host, host, host);
|
||||
|
||||
result.Merged.ShouldBe(host);
|
||||
result.HasConflicts.ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EachSideChangedADifferentField_BothSurvive()
|
||||
{
|
||||
// The reason a field-level merge is worth writing at all.
|
||||
var ancestor = Host();
|
||||
var local = ancestor with { Notes = "rotate quarterly" };
|
||||
var remote = ancestor with { Username = "postgres" };
|
||||
|
||||
var result = HostSecretMerge.Merge(ancestor, local, remote);
|
||||
|
||||
result.Merged.Notes.ShouldBe("rotate quarterly");
|
||||
result.Merged.Username.ShouldBe("postgres");
|
||||
result.HasConflicts.ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EveryScalarField_IsRoutedThroughAMerge()
|
||||
{
|
||||
// A field added to HostSecret but forgotten in the merge would silently revert to the remote
|
||||
// value forever. Changing each one only locally proves each is actually consulted.
|
||||
var ancestor = Host();
|
||||
|
||||
var local = ancestor with
|
||||
{
|
||||
Label = "prod-db-1",
|
||||
Hostname = "db1.internal",
|
||||
Port = 2222,
|
||||
Username = "admin",
|
||||
Notes = "primary",
|
||||
JumpHostIds = JumpChain.Create([Bastion]),
|
||||
Options = HostOptions.Create([new HostOption("Compression", "yes")]),
|
||||
RelayEnabled = true,
|
||||
};
|
||||
|
||||
var result = HostSecretMerge.Merge(ancestor, local, ancestor);
|
||||
|
||||
result.Merged.ShouldBe(local);
|
||||
result.HasConflicts.ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AClashingScalar_TakesRemoteAndNamesTheFieldItDiscarded()
|
||||
{
|
||||
var ancestor = Host();
|
||||
var local = ancestor with { Hostname = "db-mine.internal" };
|
||||
var remote = ancestor with { Hostname = "db-theirs.internal" };
|
||||
|
||||
var result = HostSecretMerge.Merge(ancestor, local, remote);
|
||||
|
||||
result.Merged.Hostname.ShouldBe("db-theirs.internal");
|
||||
|
||||
var conflict = result.Conflicts.ShouldHaveSingleItem();
|
||||
conflict.Field.ShouldBe(nameof(HostSecret.Hostname));
|
||||
conflict.Kept.ShouldBe("db-theirs.internal");
|
||||
conflict.Discarded.ShouldBe("db-mine.internal");
|
||||
conflict.DiscardedSide.ShouldBe(MergeSide.Local);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AClashingPort_IsReportedAsANumberNotAsBlank()
|
||||
{
|
||||
// Rendering the losing value is the entire point of the conflict record; a non-string field
|
||||
// that formatted to nothing would leave the user unable to restore it.
|
||||
var ancestor = Host(port: 22);
|
||||
var result = HostSecretMerge.Merge(ancestor, ancestor with { Port = 2222 }, ancestor with { Port = 2200 });
|
||||
|
||||
var conflict = result.Conflicts.ShouldHaveSingleItem();
|
||||
conflict.Field.ShouldBe(nameof(HostSecret.Port));
|
||||
conflict.Kept.ShouldBe("2200");
|
||||
conflict.Discarded.ShouldBe("2222");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AJumpChain_MergesAsAWholeRouteRatherThanAsASet()
|
||||
{
|
||||
// Deliberate, and the opposite of how the directives merge. Unioning two chains would
|
||||
// produce a route neither user configured and would silently change which machine is
|
||||
// reached through which — so this conflicts instead, and reports the discarded route.
|
||||
var ancestor = Host();
|
||||
var local = ancestor with { JumpHostIds = JumpChain.Create([Bastion]) };
|
||||
var remote = ancestor with { JumpHostIds = JumpChain.Create([Relay]) };
|
||||
|
||||
var result = HostSecretMerge.Merge(ancestor, local, remote);
|
||||
|
||||
result.Merged.JumpHostIds.Equals(JumpChain.Create([Relay])).ShouldBeTrue();
|
||||
result.Merged.JumpHostIds.Count.ShouldBe(1);
|
||||
|
||||
var conflict = result.Conflicts.ShouldHaveSingleItem();
|
||||
conflict.Field.ShouldBe(nameof(HostSecret.JumpHostIds));
|
||||
conflict.Discarded.ShouldNotBeNull();
|
||||
conflict.Discarded.ShouldContain(Bastion.ToString());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AReorderedJumpChain_IsAChange()
|
||||
{
|
||||
var ancestor = Host(jumps: [Bastion, Relay]);
|
||||
var local = ancestor with { JumpHostIds = JumpChain.Create([Relay, Bastion]) };
|
||||
|
||||
var result = HostSecretMerge.Merge(ancestor, local, ancestor);
|
||||
|
||||
result.Merged.JumpHostIds.Equals(JumpChain.Create([Relay, Bastion])).ShouldBeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Directives_MergePerNameSoBothAdditionsSurvive()
|
||||
{
|
||||
var ancestor = Host();
|
||||
var local = ancestor with { Options = HostOptions.Create([new HostOption("Compression", "yes")]) };
|
||||
var remote = ancestor with
|
||||
{
|
||||
Options = HostOptions.Create([new HostOption("ServerAliveInterval", "30")]),
|
||||
};
|
||||
|
||||
var result = HostSecretMerge.Merge(ancestor, local, remote);
|
||||
|
||||
result.Merged.Options.Count.ShouldBe(2);
|
||||
result.Merged.Options.TryGetValue("Compression", out var compression).ShouldBeTrue();
|
||||
compression.ShouldBe("yes");
|
||||
result.Merged.Options.TryGetValue("ServerAliveInterval", out var keepAlive).ShouldBeTrue();
|
||||
keepAlive.ShouldBe("30");
|
||||
result.HasConflicts.ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AClashingDirective_NamesTheDirectiveNotJustTheField()
|
||||
{
|
||||
// "Options changed" would be useless. The user needs to know which one.
|
||||
var ancestor = Host(options: [("Compression", "yes")]);
|
||||
var local = ancestor with { Options = HostOptions.Create([new HostOption("Compression", "no")]) };
|
||||
var remote = ancestor with
|
||||
{
|
||||
Options = HostOptions.Create([new HostOption("Compression", "delayed")]),
|
||||
};
|
||||
|
||||
var result = HostSecretMerge.Merge(ancestor, local, remote);
|
||||
|
||||
var conflict = result.Conflicts.ShouldHaveSingleItem();
|
||||
conflict.Field.ShouldBe("Options[Compression]");
|
||||
conflict.Kept.ShouldBe("delayed");
|
||||
conflict.Discarded.ShouldBe("no");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ARemovedDirectiveTheOtherSideEdited_KeepsTheValue()
|
||||
{
|
||||
var ancestor = Host(options: [("Compression", "yes")]);
|
||||
var local = ancestor with { Options = HostOptions.Empty };
|
||||
var remote = ancestor with { Options = HostOptions.Create([new HostOption("Compression", "no")]) };
|
||||
|
||||
var result = HostSecretMerge.Merge(ancestor, local, remote);
|
||||
|
||||
result.Merged.Options.TryGetValue("Compression", out var value).ShouldBeTrue();
|
||||
value.ShouldBe("no");
|
||||
result.Conflicts.ShouldHaveSingleItem().DiscardedWasRemoval.ShouldBeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TheMergedHost_IsAlwaysValidWhenBothInputsWere()
|
||||
{
|
||||
// A merge that produced an unstorable host would strand the item: it could never be pushed
|
||||
// and the conflict could never clear.
|
||||
var ancestor = Host();
|
||||
var local = ancestor with { Label = "mine", Port = 2222 };
|
||||
var remote = ancestor with { Label = "theirs", Hostname = "other.internal" };
|
||||
|
||||
var result = HostSecretMerge.Merge(ancestor, local, remote);
|
||||
|
||||
result.Merged.TryValidate(out var error).ShouldBeTrue(error);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ResolvingAConflictConverges()
|
||||
{
|
||||
// Two clients, both merging, must reach the same host and then stop. Re-merging the result
|
||||
// against the remote produces no further conflict — which is what stops an endless
|
||||
// push-conflict-merge-push loop between two machines.
|
||||
var ancestor = Host();
|
||||
var local = ancestor with { Notes = "mine", Username = "a" };
|
||||
var remote = ancestor with { Notes = "theirs", Hostname = "other.internal" };
|
||||
|
||||
var first = HostSecretMerge.Merge(ancestor, local, remote);
|
||||
first.HasConflicts.ShouldBeTrue();
|
||||
|
||||
var second = HostSecretMerge.Merge(remote, first.Merged, remote);
|
||||
|
||||
second.HasConflicts.ShouldBeFalse();
|
||||
second.Merged.ShouldBe(first.Merged);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,275 @@
|
||||
namespace DodoSSH.Client.Domain.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// The merge primitives.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// These are the rules the whole sync story rests on, so they are tested as rules rather than
|
||||
/// through the sync engine: every triple of (ancestor, local, remote) states is enumerated, and each
|
||||
/// asserts both the surviving value and — where a side lost — that the losing value came back.
|
||||
/// </remarks>
|
||||
public sealed class ThreeWayMergeTests
|
||||
{
|
||||
// ---- Scalar ----
|
||||
|
||||
[Fact]
|
||||
public void NeitherSideChanged_IsAgreement()
|
||||
{
|
||||
var merge = ThreeWayMerge.Scalar("base", "base", "base");
|
||||
|
||||
merge.Value.ShouldBe("base");
|
||||
merge.Decision.ShouldBe(MergeDecision.Agreed);
|
||||
merge.IsConflicted.ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OnlyLocalChanged_KeepsTheLocalValue()
|
||||
{
|
||||
var merge = ThreeWayMerge.Scalar("base", "mine", "base");
|
||||
|
||||
merge.Value.ShouldBe("mine");
|
||||
merge.Decision.ShouldBe(MergeDecision.TookLocal);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OnlyRemoteChanged_KeepsTheRemoteValue()
|
||||
{
|
||||
var merge = ThreeWayMerge.Scalar("base", "base", "theirs");
|
||||
|
||||
merge.Value.ShouldBe("theirs");
|
||||
merge.Decision.ShouldBe(MergeDecision.TookRemote);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void BothSidesMadeTheSameChange_IsAgreementRatherThanAConflict()
|
||||
{
|
||||
// Two people fixing the same typo must not be asked to arbitrate.
|
||||
var merge = ThreeWayMerge.Scalar("base", "fixed", "fixed");
|
||||
|
||||
merge.Value.ShouldBe("fixed");
|
||||
merge.Decision.ShouldBe(MergeDecision.Agreed);
|
||||
merge.IsConflicted.ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void BothSidesChangedDifferently_TakesRemoteAndReportsLocal()
|
||||
{
|
||||
// Remote wins so that every replica resolves the same triple identically; without a fixed
|
||||
// winner two clients each keep their own value and push over each other forever.
|
||||
var merge = ThreeWayMerge.Scalar("base", "mine", "theirs");
|
||||
|
||||
merge.Value.ShouldBe("theirs");
|
||||
merge.Decision.ShouldBe(MergeDecision.Conflicted);
|
||||
merge.IsConflicted.ShouldBeTrue();
|
||||
|
||||
// The whole justification for picking a side: the other one is handed back, never dropped.
|
||||
merge.Discarded.ShouldBe("mine");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AConflictedMerge_IsIdempotentOnceResolved()
|
||||
{
|
||||
// Convergence, spelled out. Having taken the remote value, re-merging against the same
|
||||
// remote must be agreement rather than a fresh conflict — otherwise the two clients
|
||||
// ping-pong.
|
||||
var first = ThreeWayMerge.Scalar("base", "mine", "theirs");
|
||||
var second = ThreeWayMerge.Scalar("theirs", first.Value, "theirs");
|
||||
|
||||
second.Decision.ShouldBe(MergeDecision.Agreed);
|
||||
second.Value.ShouldBe("theirs");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Scalar_UsesTheSuppliedComparer()
|
||||
{
|
||||
// Ordinal by default would call these a conflict; the comparer is how a field opts out.
|
||||
var merge = ThreeWayMerge.Scalar("base", "SAME", "same", StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
merge.Decision.ShouldBe(MergeDecision.Agreed);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Scalar_HandlesNullOnAnySide()
|
||||
{
|
||||
// Nullable fields are the common case — Username and Notes are both optional — so a null
|
||||
// must be an ordinary value here rather than a special case that throws.
|
||||
ThreeWayMerge.Scalar<string?>(null, "set", null).Value.ShouldBe("set");
|
||||
ThreeWayMerge.Scalar<string?>("was", null, "was").Value.ShouldBeNull();
|
||||
ThreeWayMerge.Scalar<string?>(null, null, null).Decision.ShouldBe(MergeDecision.Agreed);
|
||||
}
|
||||
|
||||
// ---- Map ----
|
||||
|
||||
[Fact]
|
||||
public void EachSideAddedADifferentKey_KeepsBoth()
|
||||
{
|
||||
// The single most visible benefit of a per-key merge over comparing whole collections: two
|
||||
// people adding different directives to one host both keep theirs.
|
||||
var merge = Map(
|
||||
ancestor: [],
|
||||
local: [("Compression", "yes")],
|
||||
remote: [("ServerAliveInterval", "30")]);
|
||||
|
||||
merge.Merged.Count.ShouldBe(2);
|
||||
merge.Merged["Compression"].ShouldBe("yes");
|
||||
merge.Merged["ServerAliveInterval"].ShouldBe("30");
|
||||
merge.Conflicts.ShouldBeEmpty();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EachSideAddedTheSameKeyDifferently_TakesRemoteAndReportsLocal()
|
||||
{
|
||||
var merge = Map(
|
||||
ancestor: [],
|
||||
local: [("Port", "2222")],
|
||||
remote: [("Port", "2200")]);
|
||||
|
||||
merge.Merged["Port"].ShouldBe("2200");
|
||||
|
||||
var conflict = merge.Conflicts.ShouldHaveSingleItem();
|
||||
conflict.Key.ShouldBe("Port");
|
||||
conflict.Kept.ShouldBe("2200");
|
||||
conflict.Discarded.ShouldBe("2222");
|
||||
conflict.DiscardedSide.ShouldBe(MergeSide.Local);
|
||||
conflict.DiscardedWasRemoval.ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OneSideRemovedAKeyTheOtherLeftAlone_RemovesIt()
|
||||
{
|
||||
Map(
|
||||
ancestor: [("Compression", "yes")],
|
||||
local: [],
|
||||
remote: [("Compression", "yes")])
|
||||
.Merged.ShouldBeEmpty();
|
||||
|
||||
Map(
|
||||
ancestor: [("Compression", "yes")],
|
||||
local: [("Compression", "yes")],
|
||||
remote: [])
|
||||
.Merged.ShouldBeEmpty();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RemoteEditedAKeyLocalRemoved_KeepsTheEditAndReportsTheRemoval()
|
||||
{
|
||||
// An edit outlives a removal in both directions. Re-applying a removal costs one click;
|
||||
// a discarded value may be the only copy of something the user cannot reconstruct.
|
||||
var merge = Map(
|
||||
ancestor: [("Compression", "yes")],
|
||||
local: [],
|
||||
remote: [("Compression", "no")]);
|
||||
|
||||
merge.Merged["Compression"].ShouldBe("no");
|
||||
|
||||
var conflict = merge.Conflicts.ShouldHaveSingleItem();
|
||||
conflict.DiscardedSide.ShouldBe(MergeSide.Local);
|
||||
conflict.DiscardedWasRemoval.ShouldBeTrue();
|
||||
conflict.Kept.ShouldBe("no");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void LocalEditedAKeyRemoteRemoved_KeepsTheEditAndReportsTheRemoval()
|
||||
{
|
||||
var merge = Map(
|
||||
ancestor: [("Compression", "yes")],
|
||||
local: [("Compression", "no")],
|
||||
remote: []);
|
||||
|
||||
merge.Merged["Compression"].ShouldBe("no");
|
||||
|
||||
var conflict = merge.Conflicts.ShouldHaveSingleItem();
|
||||
|
||||
// The overridden side is the remote one here, which is what makes this asymmetric from the
|
||||
// scalar rule: the tie-break is "a value beats an absence" before it is "remote wins".
|
||||
conflict.DiscardedSide.ShouldBe(MergeSide.Remote);
|
||||
conflict.DiscardedWasRemoval.ShouldBeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void BothSidesRemovedTheSameKey_IsAgreement()
|
||||
{
|
||||
var merge = Map(
|
||||
ancestor: [("Compression", "yes")],
|
||||
local: [],
|
||||
remote: []);
|
||||
|
||||
merge.Merged.ShouldBeEmpty();
|
||||
merge.Conflicts.ShouldBeEmpty();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void UnchangedKeys_SurviveAlongsideConflictingOnes()
|
||||
{
|
||||
// A conflict on one key must not disturb its neighbours, which is the difference between
|
||||
// field-level merge and replacing the collection.
|
||||
var merge = Map(
|
||||
ancestor: [("Keep", "same"), ("Fight", "base")],
|
||||
local: [("Keep", "same"), ("Fight", "mine")],
|
||||
remote: [("Keep", "same"), ("Fight", "theirs")]);
|
||||
|
||||
merge.Merged["Keep"].ShouldBe("same");
|
||||
merge.Merged["Fight"].ShouldBe("theirs");
|
||||
merge.Conflicts.ShouldHaveSingleItem().Key.ShouldBe("Fight");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Map_TreatsKeysUnderTheSuppliedComparer()
|
||||
{
|
||||
// SSH keywords are case-insensitive. Treating these as two keys would let a host carry
|
||||
// both Compression and compression, which no client could then reconcile.
|
||||
var merge = Map(
|
||||
ancestor: [("Compression", "yes")],
|
||||
local: [("compression", "yes")],
|
||||
remote: [("COMPRESSION", "yes")]);
|
||||
|
||||
merge.Merged.Count.ShouldBe(1);
|
||||
merge.Conflicts.ShouldBeEmpty();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Map_NeverDropsAValueWithoutReportingIt()
|
||||
{
|
||||
// The invariant, asserted directly rather than inferred from the cases above: every value
|
||||
// present on either side either survives into the merge or appears in the conflict list.
|
||||
var local = new[] { ("A", "1"), ("B", "2"), ("C", "3") };
|
||||
var remote = new[] { ("A", "9"), ("B", "2"), ("D", "4") };
|
||||
|
||||
var merge = Map(ancestor: [("A", "0"), ("B", "2")], local: local, remote: remote);
|
||||
|
||||
foreach (var (key, value) in local.Concat(remote))
|
||||
{
|
||||
var survived = merge.Merged.TryGetValue(key, out var kept)
|
||||
&& string.Equals(kept, value, StringComparison.Ordinal);
|
||||
|
||||
var reported = merge.Conflicts.Any(c =>
|
||||
HostOption.NameComparer.Equals(c.Key, key)
|
||||
&& string.Equals(c.Discarded, value, StringComparison.Ordinal));
|
||||
|
||||
(survived || reported).ShouldBeTrue($"{key}={value} was neither kept nor reported.");
|
||||
}
|
||||
}
|
||||
|
||||
private static MapMerge<string, string> Map(
|
||||
(string Key, string Value)[] ancestor,
|
||||
(string Key, string Value)[] local,
|
||||
(string Key, string Value)[] remote) =>
|
||||
ThreeWayMerge.Map(
|
||||
ToMap(ancestor),
|
||||
ToMap(local),
|
||||
ToMap(remote),
|
||||
HostOption.NameComparer,
|
||||
StringComparer.Ordinal);
|
||||
|
||||
private static Dictionary<string, string> ToMap((string Key, string Value)[] entries)
|
||||
{
|
||||
var map = new Dictionary<string, string>(HostOption.NameComparer);
|
||||
|
||||
foreach (var (key, value) in entries)
|
||||
{
|
||||
map[key] = value;
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
using static DodoSSH.Client.Domain.Tests.HostFactory;
|
||||
|
||||
namespace DodoSSH.Client.Domain.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// Equality of the collection types, and of the host that holds them.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This suite guards a failure that would be invisible rather than loud. If any of these compared by
|
||||
/// reference, the merge would report every host as changed on every sync pass, two identical edits
|
||||
/// would register as a conflict, and the engine would push spurious updates forever. Nothing would
|
||||
/// throw and no test elsewhere would obviously fail — which is exactly why these are asserted here.
|
||||
/// </remarks>
|
||||
public sealed class ValueSemanticsTests
|
||||
{
|
||||
[Fact]
|
||||
public void TwoHostsWithEqualContents_AreEqual()
|
||||
{
|
||||
var one = Host(jumps: [Bastion, Relay], options: [("Compression", "yes")]);
|
||||
var other = Host(jumps: [Bastion, Relay], options: [("Compression", "yes")]);
|
||||
|
||||
one.ShouldBe(other);
|
||||
one.GetHashCode().ShouldBe(other.GetHashCode());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AHostDifferingOnlyInACollection_IsNotEqual()
|
||||
{
|
||||
Host(jumps: [Bastion]).ShouldNotBe(Host(jumps: [Relay]));
|
||||
Host(options: [("Compression", "yes")]).ShouldNotBe(Host(options: [("Compression", "no")]));
|
||||
}
|
||||
|
||||
// Note on the assertion style below: these call Equals and the operators directly rather than
|
||||
// going through ShouldBe. Both of these types implement IReadOnlyList, and Shouldly compares
|
||||
// enumerables element by element — so ShouldBe would pass whatever Equals did, which is the one
|
||||
// thing this suite exists to check.
|
||||
|
||||
[Fact]
|
||||
public void AJumpChain_ComparesByContentsAndOrder()
|
||||
{
|
||||
JumpChain.Create([Bastion, Relay]).Equals(JumpChain.Create([Bastion, Relay])).ShouldBeTrue();
|
||||
(JumpChain.Create([Bastion, Relay]) == JumpChain.Create([Bastion, Relay])).ShouldBeTrue();
|
||||
|
||||
JumpChain.Create([Bastion, Relay]).Equals(JumpChain.Create([Relay, Bastion])).ShouldBeFalse();
|
||||
JumpChain.Create([Bastion]).Equals(JumpChain.Create([Bastion, Relay])).ShouldBeFalse();
|
||||
|
||||
JumpChain.Create([]).Equals(JumpChain.Empty).ShouldBeTrue();
|
||||
JumpChain.Create([Bastion]).Equals(null).ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AJumpChain_HashesByContents()
|
||||
{
|
||||
JumpChain.Create([Bastion, Relay]).GetHashCode()
|
||||
.ShouldBe(JumpChain.Create([Bastion, Relay]).GetHashCode());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AJumpChain_ComparesEqualAcrossTheSpanAndSequenceFactories()
|
||||
{
|
||||
Guid[] hops = [Bastion, Relay];
|
||||
|
||||
JumpChain.Create(hops.AsSpan()).Equals(JumpChain.Create(hops.AsEnumerable())).ShouldBeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Directives_CompareIgnoringNameCaseAndInputOrder()
|
||||
{
|
||||
// Both halves matter. Case, because a merge picks whichever spelling it saw first and two
|
||||
// clients must still agree. Order, because the collection canonicalises and a user typing
|
||||
// the same two directives in the other order has not changed anything.
|
||||
var one = HostOptions.Create([new HostOption("Compression", "yes"), new HostOption("Port", "22")]);
|
||||
var other = HostOptions.Create([new HostOption("port", "22"), new HostOption("compression", "yes")]);
|
||||
|
||||
one.Equals(other).ShouldBeTrue();
|
||||
(one == other).ShouldBeTrue();
|
||||
one.GetHashCode().ShouldBe(other.GetHashCode());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Directives_CompareValuesCaseSensitively()
|
||||
{
|
||||
// Keywords are case-insensitive in SSH; values are not. "yes" and "YES" happen to mean the
|
||||
// same to sshd, but this layer must not decide that for every directive that exists.
|
||||
HostOptions.Create([new HostOption("Compression", "yes")])
|
||||
.Equals(HostOptions.Create([new HostOption("Compression", "YES")]))
|
||||
.ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Directives_CompareUnequalWhenOneSideHasMore()
|
||||
{
|
||||
var one = HostOptions.Create([new HostOption("Compression", "yes")]);
|
||||
var other = HostOptions.Create(
|
||||
[new HostOption("Compression", "yes"), new HostOption("Port", "22")]);
|
||||
|
||||
one.Equals(other).ShouldBeFalse();
|
||||
HostOptions.Empty.Equals(one).ShouldBeFalse();
|
||||
one.Equals(null).ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Directives_AreHeldInNameOrder()
|
||||
{
|
||||
var options = HostOptions.Create(
|
||||
[
|
||||
new HostOption("ServerAliveInterval", "30"),
|
||||
new HostOption("Compression", "yes"),
|
||||
]);
|
||||
|
||||
options[0].Name.ShouldBe("Compression");
|
||||
options[1].Name.ShouldBe("ServerAliveInterval");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ARepeatedDirectiveName_IsRefused()
|
||||
{
|
||||
// A repeated keyword has no merge key, so M1 cannot represent it. Refusing is the honest
|
||||
// answer; silently keeping one of the two would lose data without saying so.
|
||||
var duplicate = new[]
|
||||
{
|
||||
new HostOption("Compression", "yes"),
|
||||
new HostOption("compression", "no"),
|
||||
};
|
||||
|
||||
HostOptions.TryCreate(duplicate, out _, out var error).ShouldBeFalse();
|
||||
error.ShouldNotBeNull();
|
||||
error.Contains("more than once", StringComparison.Ordinal).ShouldBeTrue();
|
||||
|
||||
Should.Throw<ArgumentException>(() => HostOptions.Create(duplicate));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ABlankDirectiveName_IsRefused()
|
||||
{
|
||||
HostOptions.TryCreate([new HostOption(" ", "x")], out _, out _).ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AHostBuiltWithWith_KeepsCollectionEquality()
|
||||
{
|
||||
// `with` copies the collection references, so this would pass even under reference equality.
|
||||
// It is here because the merge builds its result with an object initialiser rather than
|
||||
// `with`, and both paths have to agree.
|
||||
var host = Host(options: [("Compression", "yes")]);
|
||||
var copy = host with { Notes = "changed" };
|
||||
|
||||
copy.Options.Equals(host.Options).ShouldBeTrue();
|
||||
(copy with { Notes = host.Notes }).ShouldBe(host);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TryValidate_RejectsWhatCannotBeStored()
|
||||
{
|
||||
Host(label: "").TryValidate(out _).ShouldBeFalse();
|
||||
Host(hostname: " ").TryValidate(out _).ShouldBeFalse();
|
||||
Host(port: 65536).TryValidate(out _).ShouldBeFalse();
|
||||
Host(jumps: [Guid.Empty]).TryValidate(out _).ShouldBeFalse();
|
||||
Host().TryValidate(out _).ShouldBeTrue();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dependencies": {
|
||||
"net10.0": {
|
||||
"Meziantou.Analyzer": {
|
||||
"type": "Direct",
|
||||
"requested": "[3.0.134, )",
|
||||
"resolved": "3.0.134",
|
||||
"contentHash": "tTYCcYKyOko3TMNxmxmA9nakbcHVUgglENmCMIhzIjl9y9FBZO/0tWSxTGC74Sp198FmWih5S5KkjQRBg5ePkQ=="
|
||||
},
|
||||
"Microsoft.CodeAnalysis.BannedApiAnalyzers": {
|
||||
"type": "Direct",
|
||||
"requested": "[5.6.0, )",
|
||||
"resolved": "5.6.0",
|
||||
"contentHash": "Kcobt3pnOdO0A+6CKiMHZdTEluJpsfxiV20axtZdmfBQnDmiWTKPJADlgAfdTuKNAnVarrkJa0UEGwuOo91muw=="
|
||||
},
|
||||
"NSubstitute": {
|
||||
"type": "Direct",
|
||||
"requested": "[6.0.0, )",
|
||||
"resolved": "6.0.0",
|
||||
"contentHash": "0gvKMbiJ+/WrfbcfBfqRZZrvfLJcd3rqkqVMjjlY5dtmLRVzMY+o/K/rJUStofQ2haSr9Vd04YDfvZtVVGS3/A==",
|
||||
"dependencies": {
|
||||
"Castle.Core": "5.1.1"
|
||||
}
|
||||
},
|
||||
"Shouldly": {
|
||||
"type": "Direct",
|
||||
"requested": "[4.3.0, )",
|
||||
"resolved": "4.3.0",
|
||||
"contentHash": "sDetrWXrl6YXZ4HeLsdBoNk3uIa7K+V4uvIJ+cqdRa5DrFxeTED7VkjoxCuU1kJWpUuBDZz2QXFzSxBtVXLwRQ==",
|
||||
"dependencies": {
|
||||
"DiffEngine": "11.3.0",
|
||||
"EmptyFiles": "4.4.0"
|
||||
}
|
||||
},
|
||||
"xunit.v3": {
|
||||
"type": "Direct",
|
||||
"requested": "[3.2.2, )",
|
||||
"resolved": "3.2.2",
|
||||
"contentHash": "L+4/4y0Uqcg8/d6hfnxhnwh4j9FaeULvefTwrk30rr1o4n/vdPfyUQ8k0yzH8VJx7bmFEkDdcRfbtbjEHlaYcA==",
|
||||
"dependencies": {
|
||||
"xunit.v3.mtp-v1": "[3.2.2]"
|
||||
}
|
||||
},
|
||||
"Castle.Core": {
|
||||
"type": "Transitive",
|
||||
"resolved": "5.1.1",
|
||||
"contentHash": "rpYtIczkzGpf+EkZgDr9CClTdemhsrwA/W5hMoPjLkRFnXzH44zDLoovXeKtmxb1ykXK9aJVODSpiJml8CTw2g==",
|
||||
"dependencies": {
|
||||
"System.Diagnostics.EventLog": "6.0.0"
|
||||
}
|
||||
},
|
||||
"DiffEngine": {
|
||||
"type": "Transitive",
|
||||
"resolved": "11.3.0",
|
||||
"contentHash": "k0ZgZqd09jLZQjR8FyQbSQE86Q7QZnjEzq1LPHtj1R2AoWO8sjV5x+jlSisL7NZAbUOI4y+7Bog8gkr9WIRBGw==",
|
||||
"dependencies": {
|
||||
"EmptyFiles": "4.4.0",
|
||||
"System.Management": "6.0.1"
|
||||
}
|
||||
},
|
||||
"EmptyFiles": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.4.0",
|
||||
"contentHash": "gwJEfIGS7FhykvtZoscwXj/XwW+mJY6UbAZk+qtLKFUGWC95kfKXnj8VkxsZQnWBxJemM/q664rGLN5nf+OHZw=="
|
||||
},
|
||||
"Microsoft.ApplicationInsights": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2.23.0",
|
||||
"contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw=="
|
||||
},
|
||||
"Microsoft.Bcl.AsyncInterfaces": {
|
||||
"type": "Transitive",
|
||||
"resolved": "6.0.0",
|
||||
"contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg=="
|
||||
},
|
||||
"Microsoft.Testing.Extensions.Telemetry": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.9.1",
|
||||
"contentHash": "No5AudZMmSb+uNXjlgL2y3/stHD2IT4uxqc5yHwkE+/nNux9jbKcaJMvcp9SwgP4DVD8L9/P3OUz8mmmcvEIdQ==",
|
||||
"dependencies": {
|
||||
"Microsoft.ApplicationInsights": "2.23.0",
|
||||
"Microsoft.Testing.Platform": "1.9.1"
|
||||
}
|
||||
},
|
||||
"Microsoft.Testing.Extensions.TrxReport.Abstractions": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.9.1",
|
||||
"contentHash": "AL46Xe1WBi85Ntd4mNPvat5ZSsZ2uejiVqoKCypr8J3wK0elA5xJ3AN4G/Q4GIwzUFnggZoH/DBjnr9J18IO/g==",
|
||||
"dependencies": {
|
||||
"Microsoft.Testing.Platform": "1.9.1"
|
||||
}
|
||||
},
|
||||
"Microsoft.Testing.Platform": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.9.1",
|
||||
"contentHash": "QafNtNSmEI0zazdebnsIkDKmFtTSpmx/5PLOjURWwozcPb3tvRxzosQSL8xwYNM1iPhhKiBksXZyRSE2COisrA=="
|
||||
},
|
||||
"Microsoft.Testing.Platform.MSBuild": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.9.1",
|
||||
"contentHash": "oTUtyR4X/s9ytuiNA29FGsNCCH0rNmY5Wdm14NCKLjTM1cT9edVSlA+rGS/mVmusPqcP0l/x9qOnMXg16v87RQ==",
|
||||
"dependencies": {
|
||||
"Microsoft.Testing.Platform": "1.9.1"
|
||||
}
|
||||
},
|
||||
"Microsoft.Win32.Registry": {
|
||||
"type": "Transitive",
|
||||
"resolved": "5.0.0",
|
||||
"contentHash": "dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg=="
|
||||
},
|
||||
"System.CodeDom": {
|
||||
"type": "Transitive",
|
||||
"resolved": "6.0.0",
|
||||
"contentHash": "CPc6tWO1LAer3IzfZufDBRL+UZQcj5uS207NHALQzP84Vp/z6wF0Aa0YZImOQY8iStY0A2zI/e3ihKNPfUm8XA=="
|
||||
},
|
||||
"System.Diagnostics.EventLog": {
|
||||
"type": "Transitive",
|
||||
"resolved": "6.0.0",
|
||||
"contentHash": "lcyUiXTsETK2ALsZrX+nWuHSIQeazhqPphLfaRxzdGaG93+0kELqpgEHtwWOlQe7+jSFnKwaCAgL4kjeZCQJnw=="
|
||||
},
|
||||
"System.Management": {
|
||||
"type": "Transitive",
|
||||
"resolved": "6.0.1",
|
||||
"contentHash": "10J1D0h/lioojphfJ4Fuh5ZUThT/xOVHdV9roGBittKKNP2PMjrvibEdbVTGZcPra1399Ja3tqIJLyQrc5Wmhg==",
|
||||
"dependencies": {
|
||||
"System.CodeDom": "6.0.0"
|
||||
}
|
||||
},
|
||||
"xunit.analyzers": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.27.0",
|
||||
"contentHash": "y/pxIQaLvk/kxAoDkZW9GnHLCEqzwl5TW0vtX3pweyQpjizB9y3DXhb9pkw2dGeUqhLjsxvvJM1k89JowU6z3g=="
|
||||
},
|
||||
"xunit.v3.assert": {
|
||||
"type": "Transitive",
|
||||
"resolved": "3.2.2",
|
||||
"contentHash": "BPciBghgEEaJN/JG00QfCYDfEfnLgQhfnYEy+j1izoeHVNYd5+3Wm8GJ6JgYysOhpBPYGE+sbf75JtrRc7jrdA=="
|
||||
},
|
||||
"xunit.v3.common": {
|
||||
"type": "Transitive",
|
||||
"resolved": "3.2.2",
|
||||
"contentHash": "Hj775PEH6GTbbg0wfKRvG2hNspDCvTH9irXhH4qIWgdrOSV1sQlqPie+DOvFeigsFg2fxSM3ZAaaCDQs+KreFA==",
|
||||
"dependencies": {
|
||||
"Microsoft.Bcl.AsyncInterfaces": "6.0.0"
|
||||
}
|
||||
},
|
||||
"xunit.v3.core.mtp-v1": {
|
||||
"type": "Transitive",
|
||||
"resolved": "3.2.2",
|
||||
"contentHash": "Ga5aA2Ca9ktz+5k3g5ukzwfexwoqwDUpV6z7atSEUvqtd6JuybU1XopHqg1oFd78QdTfZgZE9h5sHpO4qYIi5w==",
|
||||
"dependencies": {
|
||||
"Microsoft.Testing.Extensions.Telemetry": "1.9.1",
|
||||
"Microsoft.Testing.Extensions.TrxReport.Abstractions": "1.9.1",
|
||||
"Microsoft.Testing.Platform": "1.9.1",
|
||||
"Microsoft.Testing.Platform.MSBuild": "1.9.1",
|
||||
"xunit.v3.extensibility.core": "[3.2.2]",
|
||||
"xunit.v3.runner.inproc.console": "[3.2.2]"
|
||||
}
|
||||
},
|
||||
"xunit.v3.extensibility.core": {
|
||||
"type": "Transitive",
|
||||
"resolved": "3.2.2",
|
||||
"contentHash": "srY8z/oMPvh/t8axtO2DwrHajhFMH7tnqKildvYrVQIfICi8fOn3yIBWkVPAcrKmHMwvXRJ/XsQM3VMR6DOYfQ==",
|
||||
"dependencies": {
|
||||
"xunit.v3.common": "[3.2.2]"
|
||||
}
|
||||
},
|
||||
"xunit.v3.mtp-v1": {
|
||||
"type": "Transitive",
|
||||
"resolved": "3.2.2",
|
||||
"contentHash": "O41aAzYKBT5PWqATa1oEWVNCyEUypFQ4va6K0kz37dduV3EKzXNMaV2UnEhufzU4Cce1I33gg0oldS8tGL5I0A==",
|
||||
"dependencies": {
|
||||
"xunit.analyzers": "1.27.0",
|
||||
"xunit.v3.assert": "[3.2.2]",
|
||||
"xunit.v3.core.mtp-v1": "[3.2.2]"
|
||||
}
|
||||
},
|
||||
"xunit.v3.runner.common": {
|
||||
"type": "Transitive",
|
||||
"resolved": "3.2.2",
|
||||
"contentHash": "/hkHkQCzGrugelOAehprm7RIWdsUFVmIVaD6jDH/8DNGCymTlKKPTbGokD5czbAfqfex47mBP0sb0zbHYwrO/g==",
|
||||
"dependencies": {
|
||||
"Microsoft.Win32.Registry": "[5.0.0]",
|
||||
"xunit.v3.common": "[3.2.2]"
|
||||
}
|
||||
},
|
||||
"xunit.v3.runner.inproc.console": {
|
||||
"type": "Transitive",
|
||||
"resolved": "3.2.2",
|
||||
"contentHash": "ulWOdSvCk+bPXijJZ73bth9NyoOHsAs1ZOvamYbCkD4DNLX/Bd29Ve2ZNUwBbK0MqfIYWXHZViy/HKrdEC/izw==",
|
||||
"dependencies": {
|
||||
"xunit.v3.extensibility.core": "[3.2.2]",
|
||||
"xunit.v3.runner.common": "[3.2.2]"
|
||||
}
|
||||
},
|
||||
"dodossh.client.domain": {
|
||||
"type": "Project"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user