-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
Closes: #35
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace NetEvolve.HealthChecks.Azure.Cosmos; | ||
|
||
public class Class1 { } | ||
Check warning on line 3 in src/NetEvolve.HealthChecks.Azure.Cosmos/Class1.cs GitHub Actions / Build & Tests / CodeQL / Run CodeQL
Check warning on line 3 in src/NetEvolve.HealthChecks.Azure.Cosmos/Class1.cs GitHub Actions / Build & Tests / CodeQL / Run CodeQL
Check warning on line 3 in src/NetEvolve.HealthChecks.Azure.Cosmos/Class1.cs GitHub Actions / Build & Tests / CodeQL / Run CodeQL
Check warning on line 3 in src/NetEvolve.HealthChecks.Azure.Cosmos/Class1.cs GitHub Actions / Build & Tests / CodeQL / Run CodeQL
Check failure on line 3 in src/NetEvolve.HealthChecks.Azure.Cosmos/Class1.cs GitHub Actions / Build & Tests / Tests / Testing .NET solution
Check failure on line 3 in src/NetEvolve.HealthChecks.Azure.Cosmos/Class1.cs GitHub Actions / Build & Tests / Tests / Testing .NET solution
Check failure on line 3 in src/NetEvolve.HealthChecks.Azure.Cosmos/Class1.cs GitHub Actions / Build & Tests / Tests / Testing .NET solution
Check failure on line 3 in src/NetEvolve.HealthChecks.Azure.Cosmos/Class1.cs GitHub Actions / Build & Tests / Tests / Testing .NET solution
Check failure on line 3 in src/NetEvolve.HealthChecks.Azure.Cosmos/Class1.cs GitHub Actions / Build & Tests / Tests / Testing .NET solution
Check failure on line 3 in src/NetEvolve.HealthChecks.Azure.Cosmos/Class1.cs GitHub Actions / Build & Tests / Tests / Testing .NET solution
Check failure on line 3 in src/NetEvolve.HealthChecks.Azure.Cosmos/Class1.cs GitHub Actions / Build & Tests / Tests / Testing .NET solution
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>$(_ProjectTargetFrameworks)</TargetFrameworks> | ||
|
||
<Description>Contains HealthChecks for Azure CosmosDB.</Description> | ||
<PackageTags>$(PackageTags);azure;cosmos;cosmosdb;</PackageTags> | ||
|
||
<AzureCosmosDisableNewtonsoftJsonCheck>true</AzureCosmosDisableNewtonsoftJsonCheck> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Azure.Cosmos" /> | ||
<PackageReference Include="NetEvolve.Arguments" /> | ||
<PackageReference Include="NetEvolve.Extensions.Tasks" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\NetEvolve.HealthChecks.Abstractions\NetEvolve.HealthChecks.Abstractions.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace NetEvolve.HealthChecks.Tests.Integration.Azure.Cosmos; | ||
|
||
using System; | ||
using System.Threading.Tasks; | ||
using Testcontainers.CosmosDb; | ||
using TestContainer = Testcontainers.CosmosDb.CosmosDbContainer; | ||
|
||
public sealed class CosmosDbContainer : IAsyncLifetime, IAsyncDisposable | ||
{ | ||
private readonly TestContainer _container = new CosmosDbBuilder().Build(); | ||
|
||
public async Task DisposeAsync() => await _container.DisposeAsync().ConfigureAwait(false); | ||
|
||
public async Task InitializeAsync() => await _container.StartAsync().ConfigureAwait(false); | ||
|
||
async ValueTask IAsyncDisposable.DisposeAsync() => | ||
await _container.DisposeAsync().ConfigureAwait(false); | ||
} |