Skip to content
This repository was archived by the owner on Mar 27, 2020. It is now read-only.
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
15 changes: 15 additions & 0 deletions src/ServiceControl.Monitoring.Tests/API/SettingsTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace ServiceControl.Monitoring.Tests.API
{
using System.Configuration;
using NUnit.Framework;
using Particular.Approvals;

class SettingsTests
{
[Test]
public void PlatformSampleSettings()
{
Approver.Verify(Settings.Load(new SettingsReader(ConfigurationManager.AppSettings)));
}
}
}
9 changes: 9 additions & 0 deletions src/ServiceControl.Monitoring.Tests/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="Monitoring/HttpHostname" value="localhost" />
<add key="Monitoring/HttpPort" value="9999" />
<add key="Monitoring/LogPath" value="C:\Logs" />
<add key="Monitoring/TransportType" value="NServiceBus.ServiceControlLearningTransport, ServiceControl.Transports.LearningTransport" />
</appSettings>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"EndpointName": "Particular.Monitoring",
"ServiceName": "Particular.Monitoring",
"TransportType": "NServiceBus.ServiceControlLearningTransport, ServiceControl.Transports.LearningTransport",
"ErrorQueue": "error",
"LogPath": "C:\\Logs",
"LogLevel": {
"Name": "Warn",
"Ordinal": 3
},
"Username": null,
"EnableInstallers": false,
"HttpHostName": "localhost",
"HttpPort": "9999",
"EndpointUptimeGracePeriod": "00:00:40",
"SkipQueueCreation": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageReference Include="HdrHistogram" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
<PackageReference Include="Particular.Approvals" Version="0.2.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/ServiceControl.Monitoring/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ internal static Settings Load(SettingsReader reader)
// debugging or if the entry is removed manually. In those circumstances default to the folder containing the exe
internal static string DefaultLogLocation()
{
var assemblyLocation = Assembly.GetEntryAssembly().Location;
var assemblyLocation = Assembly.GetExecutingAssembly().Location;
return Path.GetDirectoryName(assemblyLocation);
}
}
Expand Down