-
Notifications
You must be signed in to change notification settings - Fork 739
Split redis tests into separate test assembly #4468
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
Changes from 14 commits
50a9e63
8d36ff8
c6a1655
fbda632
3488419
98d2f86
7e9eef0
c8be7b3
6462358
1394ee8
7268fe3
6818dab
03e54d3
153f97b
0859fb6
497e633
c55aa34
9bc54e9
69f4ea9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,7 @@ | |
|
|
||
| <ItemGroup> | ||
| <InternalsVisibleTo Include="Aspire.Hosting.Tests" /> | ||
| <InternalsVisibleTo Include="Aspire.Hosting.Redis.Tests" /> | ||
|
||
| </ItemGroup> | ||
|
|
||
| </Project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,8 +54,8 @@ public void WithImageMutatesImageNameOfLastAnnotation() | |
| public void WithImageTagMutatesImageTag() | ||
| { | ||
| using var builder = TestDistributedApplicationBuilder.Create(); | ||
| var redis = builder.AddContainer("redis", "redis").WithImageTag("foo"); | ||
| Assert.Equal("foo", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Tag); | ||
| var redis = builder.AddRedis("redis").WithImageTag("7.1"); | ||
| Assert.Equal("7.1", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Tag); | ||
|
||
| } | ||
|
|
||
| [Fact] | ||
|
|
@@ -80,7 +80,7 @@ public void WithImageTagThrowsIfNoImageAnnotation() | |
| using var builder = TestDistributedApplicationBuilder.Create(); | ||
| var container = builder.AddResource(new TestContainerResource("testcontainer")); | ||
|
|
||
| var exception = Assert.Throws<InvalidOperationException>(() => container.WithImageTag("foo")); | ||
| var exception = Assert.Throws<InvalidOperationException>(() => container.WithImageTag("7.1")); | ||
| Assert.Equal("The resource 'testcontainer' does not have a container image specified. Use WithImage to specify the container image and tag.", exception.Message); | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,16 @@ | ||||||||||
| <Project Sdk="Microsoft.NET.Sdk"> | ||||||||||
|
|
||||||||||
| <PropertyGroup> | ||||||||||
| <TargetFramework>$(NetCurrent)</TargetFramework> | ||||||||||
| </PropertyGroup> | ||||||||||
|
|
||||||||||
| <ItemGroup> | ||||||||||
| <ProjectReference Include="..\..\src\Aspire.Hosting.AppHost\Aspire.Hosting.AppHost.csproj" IsAspireProjectResource="false" /> | ||||||||||
| <ProjectReference Include="..\..\src\Aspire.Hosting.Redis\Aspire.Hosting.Redis.csproj" IsAspireProjectResource="false" /> | ||||||||||
|
||||||||||
| <ProjectReference Include="..\..\src\Aspire.Hosting.AppHost\Aspire.Hosting.AppHost.csproj" IsAspireProjectResource="false" /> | |
| <ProjectReference Include="..\..\src\Aspire.Hosting.Redis\Aspire.Hosting.Redis.csproj" IsAspireProjectResource="false" /> | |
| <ProjectReference Include="..\..\src\Aspire.Hosting.AppHost\Aspire.Hosting.AppHost.csproj" /> | |
| <ProjectReference Include="..\..\src\Aspire.Hosting.Redis\Aspire.Hosting.Redis.csproj" /> |
Are these needed? This project doesn't have <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.
Works as you suggest
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.
We should aim to remove this.