-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add Meilisearch integration #66
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the WIP as it stands and my only concern is that I'm not sure if we should be shipping the config schema stuff as part of the Community Toolkit packages.
...pire.CommunityToolkit.Hosting.Meilisearch/Aspire.CommunityToolkit.Hosting.Meilisearch.csproj
Outdated
Show resolved
Hide resolved
...pire.CommunityToolkit.Hosting.Meilisearch/Aspire.CommunityToolkit.Hosting.Meilisearch.csproj
Outdated
Show resolved
Hide resolved
src/Aspire.CommunityToolkit.Meilisearch/Aspire.CommunityToolkit.Meilisearch.csproj
Outdated
Show resolved
Hide resolved
@@ -85,18 +86,18 @@ protected virtual void DisableRetries(TOptions options) { } | |||
/// </summary> | |||
protected abstract void SetMetrics(TOptions options, bool enabled); | |||
|
|||
[ConditionalFact] | |||
[SkippableFact] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aaronpowell, ConditionalFact
and ConditionalTheory
don't work.
I tried to fix it but did not. I used Xunit.SkippableFact
packackge instead.
Can you check why these attributes don't work and if possible fix it?
Otherwise, we can continue using Xunit.SkippableFact
package.
@@ -13,9 +13,11 @@ | |||
<AspireVersion>8.2.0</AspireVersion> | |||
<AspNetCoreVersion>8.0.7</AspNetCoreVersion> | |||
<OpenTelemetryVersion>1.9.0</OpenTelemetryVersion> | |||
|
|||
<TestcontainersVersion>3.10.0</TestcontainersVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<TestcontainersVersion>3.10.0</TestcontainersVersion> | |
<TestContainersVersion>3.10.0</TestContainersVersion> |
<!-- Build dependencies --> | ||
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4" /> | ||
<!-- Testcontainers packages --> | ||
<PackageVersion Include="Testcontainers" Version="$(TestcontainersVersion)" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<PackageVersion Include="Testcontainers" Version="$(TestcontainersVersion)" /> | |
<PackageVersion Include="Testcontainers" Version="$(TestContainersVersion)" /> |
|
||
<ItemGroup> | ||
<Compile Include="..\VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" /> | ||
<!--<Compile Include="$(ComponentsDir)Aspire.Meilisearch\MeilisearchHealthCheck.cs" Link="MeilisearchHealthCheck.cs"></Compile>--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this blocked until aspire-9?
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="..\HealthChecksExtensions.cs" Link="Utils\HealthChecksExtensions.cs" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use RepoRoot
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's pop the "Copied from aspire " in here
[Theory] | ||
[InlineData("meilisearch")] | ||
public async Task ResourceStartsAndRespondsOk(string resourceName) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only need to use a Fact
here as there's a single resource we're testing against.
[Theory] | |
[InlineData("meilisearch")] | |
public async Task ResourceStartsAndRespondsOk(string resourceName) | |
{ | |
[Fact] | |
public async Task ResourceStartsAndRespondsOk() | |
{ | |
var resourceName = "meilisearch"; |
new() { Id = "6", Title = "Philadelphia", Genres = ["Drama"] } | ||
]; | ||
[Fact] | ||
[RequiresDocker] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably put this on the class rather than the methods.
public AspireMeilisearchClientExtensionsTest(MeilisearchContainerFixture containerFixture) | ||
{ | ||
_containerFixture = containerFixture; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a primary constructor for consistency
@@ -5,8 +5,13 @@ | |||
<ImplicitUsings>enable</ImplicitUsings> | |||
<Nullable>enable</Nullable> | |||
<IsTestProject>false</IsTestProject> | |||
<IsAspireHost>true</IsAspireHost> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to make the test project an Aspire host?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this different to the classes exposed by Aspire.Hosting.Testing
for creating the DistributedApplication for a test?
Closes #65
PR Checklist
Other information