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

Port the functional validation tests from aspnet-contrib and OpenIddict 2.x #808

Open
kevinchalet opened this issue Sep 27, 2019 · 4 comments

Comments

@kevinchalet
Copy link
Member

Both the aspnet-contrib validation/introspection handlers and OpenIddict have a ton of functional tests that rely on ASP.NET Core's TestServer. As part of the 3.0 effort, we'll need to progressively bring them back:

@anorborg
Copy link

@kevinchalet I wanted to give contributing a shot and was going to at least attempt this issue. I have never contributed to a mainstream dotnet project like this so apologies for my green-ness, but I'm have a bit of trouble getting started. I have cloned locally and got everything building. I attempted to create a new test project and was attempting to follow the patterns of the existing test projects. None of the test projects have direct package references to xunit packages. From what I can gather, it looks like that it maybe handled by arcarde. However, I can seem to tell how I get my project to get the xunit packages added in the same way. Do you have any documentation or general instructions on getting things setup? If my limited experience precludes me from being able to contribute effectively, I completely understand. Thanks! I really appreciate this project and your efforts.

@kevinchalet
Copy link
Member Author

I wanted to give contributing a shot and was going to at least attempt this issue.

@anorborg thanks a lot for your interest!

If my limited experience precludes me from being able to contribute effectively, I completely understand. Thanks!

It's definitely not a problem, and contributing is always a good way to learn new things, so please don't hesitate 😄

None of the test projects have direct package references to xunit packages. From what I can gather, it looks like that it maybe handled by arcarde. However, I can seem to tell how I get my project to get the xunit packages added in the same way. Do you have any documentation or general instructions on getting things setup?

As you figured out, the xUnit package references are indeed automagically added by Arcade, for which the documentation is a bit limited. That said, it mostly works using conventions: your test project must be in the test folder and end with Tests or IntegrationTests.

You can follow the same pattern I adopted for the server integration tests: a "common/shared" project named OpenIddict.Validation.IntegrationTests and two OpenIddict.Validation.AspNetCore.IntegrationTests/OpenIddict.Validation.Owin.IntegrationTests projects for the host-specific tests and the CreateClient method used by the tests in the common projects.

If you're still having issues, please let me know!

@kevinchalet
Copy link
Member Author

FYI, the introspection feature hasn't yet been ported to OpenIddict, so please ignore the tests in AspNet.Security.OAuth.Introspection.Tests for now.

@kevinchalet
Copy link
Member Author

Note: the introspection feature was ported as part of #947.

@kevinchalet kevinchalet reopened this May 30, 2020
@kevinchalet kevinchalet pinned this issue Jun 2, 2020
@kevinchalet kevinchalet modified the milestones: 3.0.0-beta2, 3.0.0-beta3 Jun 30, 2020
@kevinchalet kevinchalet modified the milestones: 3.0.0-beta3, 3.0.0-beta4 Jul 12, 2020
@kevinchalet kevinchalet modified the milestones: 3.0.0-beta4, 3.0.0-beta5 Aug 25, 2020
@kevinchalet kevinchalet modified the milestones: 3.0.0-beta5, 3.0.0-beta6 Oct 3, 2020
@kevinchalet kevinchalet modified the milestones: 3.0.0-beta6, 3.0.0-rc1 Oct 18, 2020
@kevinchalet kevinchalet unpinned this issue Oct 21, 2020
@kevinchalet kevinchalet modified the milestones: 3.0.0-rc1, 3.0.0-rc2 Nov 16, 2020
@kevinchalet kevinchalet modified the milestones: 3.0.0-rc2, 3.0.0 Dec 7, 2020
@kevinchalet kevinchalet modified the milestones: 3.0.0, 3.1.0-preview1 Dec 23, 2020
@kevinchalet kevinchalet removed this from the 4.0.0-preview4 milestone Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants