Skip to content

Commit 5208b71

Browse files
author
Francisco Liberal
committed
adding back healthcheck
1 parent b2e6101 commit 5208b71

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

src/ArcadeDotnet.Tests/ArcadeClientTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,13 @@ public void Client_ShouldNotExposeHttpClient()
166166
}
167167

168168
[Fact]
169-
public void Client_ShouldNotHaveHealthService()
169+
public void Client_ShouldHaveHealthService()
170170
{
171-
// Assert - Health should not be on interface
171+
// Assert - Health should be on interface for operational monitoring
172172
var interfaceType = typeof(IArcadeClient);
173173
var healthProperty = interfaceType.GetProperty("Health");
174174

175-
Assert.Null(healthProperty); // Health removed from main client
175+
Assert.NotNull(healthProperty); // Health service available
176176
}
177177
}
178178

src/ArcadeDotnet.Tests/Services/Health/HealthServiceTest.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ namespace ArcadeDotnet.Tests.Services.Health;
44

55
public class HealthServiceTest : TestBase
66
{
7-
// Health service removed from main client - it's for ops/monitoring, not business logic
8-
// If needed, health checks can be done directly via HTTP GET to /v1/health
7+
[Fact]
8+
public async Task Check_Works()
9+
{
10+
var healthSchema = await this.Client.Health.Check();
11+
healthSchema.Validate();
12+
}
913
}

src/ArcadeDotnet/ArcadeClient.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using ArcadeDotnet.Services.Admin;
77
using ArcadeDotnet.Services.Auth;
88
using ArcadeDotnet.Services.Chat;
9+
using ArcadeDotnet.Services.Health;
910
using ArcadeDotnet.Services.Tools;
1011
using ArcadeDotnet.Services.Workers;
1112

@@ -41,6 +42,10 @@ public sealed partial class ArcadeClient : IArcadeClient
4142
/// </summary>
4243
public IAuthService Auth { get; }
4344

45+
/// <summary>
46+
/// Gets the health check service.
47+
/// </summary>
48+
public IHealthService Health { get; }
4449

4550
/// <summary>
4651
/// Gets the chat service.
@@ -151,6 +156,7 @@ public ArcadeClient(ArcadeClientOptions options)
151156
// Initialize services
152157
Admin = new AdminService(this);
153158
Auth = new AuthService(this);
159+
Health = new HealthService(this);
154160
Chat = new ChatService(this);
155161
Tools = new ToolService(this);
156162
Workers = new WorkerService(this);

src/ArcadeDotnet/ArcadeDotnet.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<AssemblyTitle>SDK Code Generation Arcade C#</AssemblyTitle>
77
<PackageLicenseExpression>MIT</PackageLicenseExpression>
88
<Nullable>enable</Nullable>
9-
<VersionPrefix>0.1.0</VersionPrefix>
9+
<VersionPrefix>0.2.0</VersionPrefix>
1010
<TargetFrameworks>net8.0</TargetFrameworks>
1111
<LangVersion>latest</LangVersion>
1212
<!-- Generate an XML documentation file for the project. -->

src/ArcadeDotnet/IArcadeClient.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using ArcadeDotnet.Services.Admin;
66
using ArcadeDotnet.Services.Auth;
77
using ArcadeDotnet.Services.Chat;
8+
using ArcadeDotnet.Services.Health;
89
using ArcadeDotnet.Services.Tools;
910
using ArcadeDotnet.Services.Workers;
1011

@@ -29,6 +30,7 @@ public interface IArcadeClient
2930

3031
IAuthService Auth { get; }
3132

33+
IHealthService Health { get; }
3234

3335
IChatService Chat { get; }
3436

0 commit comments

Comments
 (0)