Skip to content

Commit

Permalink
fix: added test for SetHostNameProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
kulbachnyi.v committed Dec 28, 2023
1 parent bf5543a commit c306ac4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Vostok.ServiceDiscovery.Tests/ReplicaInfoBuilder_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ public void Should_be_configurable()
.SetCommitHash("ASDF")
.SetReleaseDate("released now")
.SetDependencies(new List<string> {"dep-a", "dep-b"})
.SetTags(new TagCollection{"tag1", {"tag2", "value"}}), false);
.SetTags(new TagCollection{"tag1", {"tag2", "value"}})
.SetHostnameProvider(useFqdn => "newHostName"), false);

info.ReplicaInfo.Environment.Should().Be("custom-environment");
info.ReplicaInfo.Application.Should().Be("Vostok.App.1");
Expand All @@ -82,6 +83,8 @@ public void Should_be_configurable()
properties[ReplicaInfoKeys.CommitHash].Should().Be("ASDF");
properties[ReplicaInfoKeys.ReleaseDate].Should().Be("released now");
properties[ReplicaInfoKeys.Dependencies].Should().Be("dep-a;dep-b");

properties[ReplicaInfoKeys.Host].Should().Be("newHostName");
}

[Test]
Expand Down

0 comments on commit c306ac4

Please sign in to comment.