-
Notifications
You must be signed in to change notification settings - Fork 521
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
Extract Aspire.Hosting.SqlServer.Tests project #5056
Conversation
|
tests/Aspire.Hosting.SqlServer.Tests/SqlServerFunctionalTests.cs
Outdated
Show resolved
Hide resolved
tests/Aspire.Hosting.SqlServer.Tests/SqlServerFunctionalTests.cs
Outdated
Show resolved
Hide resolved
tests/Aspire.Hosting.SqlServer.Tests/SqlServerFunctionalTests.cs
Outdated
Show resolved
Hide resolved
Something I was asked to do, and maybe you can take what I did as an example, if to also use the EF component in this functional test to extend the coverage. |
# Conflicts: # Aspire.sln
Build failing on an unrelated flaky test. @eerhardt can you review? |
@@ -71,5 +71,21 @@ public static IResourceBuilder<SqlServerServerResource> WithDataVolume(this IRes | |||
/// <param name="isReadOnly">A flag that indicates if this is a read-only mount.</param> | |||
/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> | |||
public static IResourceBuilder<SqlServerServerResource> WithDataBindMount(this IResourceBuilder<SqlServerServerResource> builder, string source, bool isReadOnly = false) | |||
=> builder.WithBindMount(source, "/var/opt/mssql", isReadOnly); | |||
{ | |||
// c.f. https://learn.microsoft.com/sql/linux/sql-server-linux-docker-container-configure?view=sql-server-ver15&pivots=cs1-bash#mount-a-host-directory-as-data-volume |
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.
Why is this done only for WithDataBindMount
and not for WithDataVolume
?
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.
Binding specific folders only applies to folder mounts, not volumes. Volumes just work fine locally without changes, and the documentation only uses it for folders mounts too.
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.
@rwestMSFT - I see you wrote the documentation being referenced here in MicrosoftDocs/sql-docs@51dddc6. Is there a reason we need to split all 3 directories when binding to a host directory, but when using a docker volume you just need a single volume? Why doesn't it work to map the single top-level /var/opt/mssql
directory to the host machine?
cc @JerryNixon
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.
@eerhardt My name appears on thousands of articles. Please refer to the author
in metadata when reviewing SQL Docs content.
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.
@amitkh-msft - Looks like you are the "author" of the article referenced above. Any chance you can answer the above question?
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.
Ack. Sure, please give me some time. I will look at this and try to answer the question.
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.
Any thoughts @amitkh-msft? Why can't we just bind mount to the root directory instead of the 3 separate ones?
tests/testproject/TestProject.IntegrationServiceA/TestProject.IntegrationServiceA.csproj
Outdated
Show resolved
Hide resolved
tests/Aspire.Hosting.SqlServer.Tests/SqlServerFunctionalTests.cs
Outdated
Show resolved
Hide resolved
tests/Aspire.Hosting.SqlServer.Tests/SqlServerFunctionalTests.cs
Outdated
Show resolved
Hide resolved
tests/Aspire.Hosting.SqlServer.Tests/SqlServerFunctionalTests.cs
Outdated
Show resolved
Hide resolved
tests/Aspire.Hosting.SqlServer.Tests/Aspire.Hosting.SqlServer.Tests.csproj
Outdated
Show resolved
Hide resolved
…IntegrationServiceA.csproj Co-authored-by: Eric Erhardt <[email protected]>
…Tests.csproj Co-authored-by: Eric Erhardt <[email protected]>
Co-authored-by: Eric Erhardt <[email protected]>
Co-authored-by: Eric Erhardt <[email protected]>
tests/Aspire.Hosting.SqlServer.Tests/SqlServerFunctionalTests.cs
Outdated
Show resolved
Hide resolved
tests/Aspire.Hosting.SqlServer.Tests/SqlServerFunctionalTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Eric Erhardt <[email protected]>
tests/Aspire.Hosting.SqlServer.Tests/SqlServerFunctionalTests.cs
Outdated
Show resolved
Hide resolved
tests/Aspire.Hosting.SqlServer.Tests/SqlServerFunctionalTests.cs
Outdated
Show resolved
Hide resolved
# Conflicts: # tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj
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.
I think my only real concern is the product change to WithDataBindMount
. I don't understand why the 3 directories are needed, as opposed to just 1 root level directory.
But we can follow up later around this, if needed.
Contributes to #3185
Contributes to #4294
Microsoft Reviewers: Open in CodeFlow