Skip to content
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
7 changes: 7 additions & 0 deletions Aspire.sln
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aspire.Hosting.PostgreSQL.T
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aspire.Hosting.Qdrant.Tests", "tests\Aspire.Hosting.Qdrant.Tests\Aspire.Hosting.Qdrant.Tests.csproj", "{8E2AA85E-C351-47B4-AF91-58557FAD5840}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aspire.Hosting.MySql.Tests", "tests\Aspire.Hosting.MySql.Tests\Aspire.Hosting.MySql.Tests.csproj", "{F3F33CF8-A2BB-4351-8501-A6884C5126FE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aspire.Hosting.Kafka.Tests", "tests\Aspire.Hosting.Kafka.Tests\Aspire.Hosting.Kafka.Tests.csproj", "{0A83AA67-221E-44B4-9BA9-DC64DC17949E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aspire.Hosting.Python.Tests", "tests\Aspire.Hosting.Python.Tests\Aspire.Hosting.Python.Tests.csproj", "{72F5A6F3-3516-402B-8F8D-50A7BC2E4BD4}"
Expand Down Expand Up @@ -1403,6 +1405,10 @@ Global
{8E2AA85E-C351-47B4-AF91-58557FAD5840}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E2AA85E-C351-47B4-AF91-58557FAD5840}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E2AA85E-C351-47B4-AF91-58557FAD5840}.Release|Any CPU.Build.0 = Release|Any CPU
{F3F33CF8-A2BB-4351-8501-A6884C5126FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F3F33CF8-A2BB-4351-8501-A6884C5126FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F3F33CF8-A2BB-4351-8501-A6884C5126FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F3F33CF8-A2BB-4351-8501-A6884C5126FE}.Release|Any CPU.Build.0 = Release|Any CPU
{0A83AA67-221E-44B4-9BA9-DC64DC17949E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A83AA67-221E-44B4-9BA9-DC64DC17949E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A83AA67-221E-44B4-9BA9-DC64DC17949E}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -1692,6 +1698,7 @@ Global
{72F5A6F3-3516-402B-8F8D-50A7BC2E4BD4} = {830A89EC-4029-4753-B25A-068BAE37DEC7}
{7425E5B2-BC47-4521-AC40-B8CECA329E08} = {830A89EC-4029-4753-B25A-068BAE37DEC7}
{8E2AA85E-C351-47B4-AF91-58557FAD5840} = {830A89EC-4029-4753-B25A-068BAE37DEC7}
{F3F33CF8-A2BB-4351-8501-A6884C5126FE} = {830A89EC-4029-4753-B25A-068BAE37DEC7}
{0A83AA67-221E-44B4-9BA9-DC64DC17949E} = {830A89EC-4029-4753-B25A-068BAE37DEC7}
{1C16DC2D-3B79-4081-AC1E-F3F965C61216} = {830A89EC-4029-4753-B25A-068BAE37DEC7}
{C87D9F7D-300A-4880-A7E1-835772749912} = {27381127-6C45-4B4C-8F18-41FF48DFE4B2}
Expand Down
3 changes: 2 additions & 1 deletion src/Aspire.Hosting.MySql/Aspire.Hosting.MySql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="Aspire.Hosting.Tests" />
<!-- Required for PhpMyAdminConfigWriterHook -->
<InternalsVisibleTo Include="Aspire.Hosting.MySql.Tests" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<ItemGroup>
<Compile Include="$(SharedDir)StringComparers.cs" Link="Utils\StringComparers.cs" />
<Compile Include="$(SharedDir)VolumeNameGenerator.cs" Link="Utils\VolumeNameGenerator.cs" />
<Compile Include="$(RepoRoot)src\Aspire.Hosting.Testing\ResourceLoggerForwarderService.cs" Link="Utils\ResourceLoggerForwarderService.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions tests/Aspire.EndToEnd.Tests/IntegrationServicesFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ public Task DumpComponentLogsAsync(TestResourceNames resource, ITestOutputHelper
TestResourceNames.garnet => "garnet",
TestResourceNames.milvus => "milvus",
TestResourceNames.mongodb => "mongodb",
TestResourceNames.mysql or TestResourceNames.efmysql => "mysql",
TestResourceNames.oracledatabase => "oracledatabase",
TestResourceNames.postgres or TestResourceNames.efnpgsql => "postgres",
TestResourceNames.rabbitmq => "rabbitmq",
Expand Down Expand Up @@ -151,8 +150,6 @@ private static TestResourceNames GetResourcesToSkip()
| TestResourceNames.garnet
| TestResourceNames.postgres
| TestResourceNames.efnpgsql
| TestResourceNames.mysql
| TestResourceNames.efmysql
| TestResourceNames.sqlserver
| TestResourceNames.efsqlserver
| TestResourceNames.milvus,
Expand Down
2 changes: 0 additions & 2 deletions tests/Aspire.EndToEnd.Tests/IntegrationServicesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ public IntegrationServicesTests(ITestOutputHelper testOutput, IntegrationService
[Theory]
[Trait("scenario", "basicservices")]
[InlineData(TestResourceNames.mongodb)]
[InlineData(TestResourceNames.mysql)]
[InlineData(TestResourceNames.efmysql)]
[InlineData(TestResourceNames.postgres)]
[InlineData(TestResourceNames.efnpgsql)]
[InlineData(TestResourceNames.rabbitmq)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ await pipeline.ExecuteAsync(

try
{
File.Delete(bindMountPath);
Directory.Delete(bindMountPath);
}
catch
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

using System.Net.Sockets;
using System.Text.RegularExpressions;
using Aspire.Hosting.MySql;
using Aspire.Hosting.ApplicationModel;
using Aspire.Hosting.Tests.Utils;
using Aspire.Hosting.Utils;
using Microsoft.Extensions.DependencyInjection;
using Xunit;

namespace Aspire.Hosting.Tests.MySql;
namespace Aspire.Hosting.MySql.Tests;

public class AddMySqlTests
{
Expand All @@ -20,7 +20,7 @@ public void AddMySqlAddsGeneratedPasswordParameterWithUserSecretsParameterDefaul

var mysql = appBuilder.AddMySql("mysql");

Assert.IsType<UserSecretsParameterDefault>(mysql.Resource.PasswordParameter.Default);
Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", mysql.Resource.PasswordParameter.Default?.GetType().FullName);
}

[Fact]
Expand All @@ -30,7 +30,7 @@ public void AddMySqlDoesNotAddGeneratedPasswordParameterWithUserSecretsParameter

var mysql = appBuilder.AddMySql("mysql");

Assert.IsNotType<UserSecretsParameterDefault>(mysql.Resource.PasswordParameter.Default);
Assert.NotEqual("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", mysql.Resource.PasswordParameter.Default?.GetType().FullName);
}

[Fact]
Expand Down
20 changes: 20 additions & 0 deletions tests/Aspire.Hosting.MySql.Tests/Aspire.Hosting.MySql.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetCurrent)</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Aspire.Hosting.AppHost\Aspire.Hosting.AppHost.csproj" />
<ProjectReference Include="..\Aspire.Hosting.Tests\Aspire.Hosting.Tests.csproj" />
<ProjectReference Include="..\..\src\Aspire.Hosting.MySql\Aspire.Hosting.MySql.csproj" />
<ProjectReference Include="..\..\src\Components\Aspire.MySqlConnector\Aspire.MySqlConnector.csproj" />
<ProjectReference Include="..\..\src\Components\Aspire.Pomelo.EntityFrameworkCore.MySql\Aspire.Pomelo.EntityFrameworkCore.MySql.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Include="$(SharedDir)SecretsStore.cs" Link="Utils\SecretsStore.cs" />
<Compile Include="$(RepoRoot)src\Aspire.Hosting.Testing\ResourceLoggerForwarderService.cs" Link="Utils\ResourceLoggerForwarderService.cs" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should be compiling this into our tests. If we need this, we should just reference Aspire.Hosting.Testing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in another PR, copied here.

</ItemGroup>

</Project>
Loading