Skip to content
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

Adding public API test coverage for Aspire.Hosting.Elasticsearch #5119

Conversation

Alirexaa
Copy link
Contributor

@Alirexaa Alirexaa commented Jul 30, 2024

Contributes to #2649 and #5047

Microsoft Reviewers: Open in CodeFlow

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-integrations Issues pertaining to Aspire Integrations packages label Jul 30, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jul 30, 2024
@sebastienros
Copy link
Member

sebastienros commented Jul 31, 2024

@Zombach Small request for you or for whoever merges them, can you name them with a more meaningful title, something like "Adding public API test coverage for Aspire.Hosting.Elasticsearch". CA1062 is quite cryptic when you are not familiar with these PRs.

@Alirexaa Alirexaa changed the title CA1062#Aspire.Hosting.Elasticsearch Adding public API test coverage for Aspire.Hosting.Elasticsearch Jul 31, 2024
[Fact]
public void AddElasticsearchContainerShouldThrowWhenNameIsNull()
{
IDistributedApplicationBuilder builder = new DistributedApplicationBuilder([]);
Copy link
Contributor

Choose a reason for hiding this comment

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

As I found out. Better to use TestDistributedApplicationBuilder.Create();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AFIK TestDistributedApplicationBuilder is suitable when starting the app. Here, it seems unnecessary.

Copy link
Contributor

@Zombach Zombach Aug 1, 2024

Choose a reason for hiding this comment

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

AFIK TestDistributedApplicationBuilder is suitable when starting the app. Here, it seems unnecessary.

I wanted this more from the point of view that there would be a single code base for checking the public 'null'.
Although you may be right. View this at your own discretion. Well, or ask the guys what they think about this

@Alirexaa
Copy link
Contributor Author

@sebastienros, this PR is ready to merge.

@mitchdenny
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mitchdenny mitchdenny enabled auto-merge (squash) August 21, 2024 04:33
@mitchdenny mitchdenny merged commit 319bcbb into dotnet:main Aug 21, 2024
11 checks passed
@Alirexaa Alirexaa deleted the validate-arguments-of-public-methods#aspire-hosting-elasticsearch branch August 21, 2024 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-integrations Issues pertaining to Aspire Integrations packages community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants