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

Test API auth #63

Open
Rutherther opened this issue Aug 13, 2021 · 1 comment
Open

Test API auth #63

Rutherther opened this issue Aug 13, 2021 · 1 comment
Labels
api API plugin change

Comments

@Rutherther
Copy link
Member

  • all types of duplicates
  • teachers
  • bachelor, master, doctor
  • all roles should be assigned in correct cases
  • if every request to kos or usermap is made only once and then cached
  • if auth role processor will ever handle more things at once (maybe add check for stop after assigning roles?)
  • only same ctu username should be allowed if it was already set
  • errors of kos or usermap apis should be logged as warnings, but should not throw exceptions
@Rutherther Rutherther added the api API plugin change label Aug 17, 2021
@Rutherther Rutherther added this to the v1.0.0 milestone Aug 18, 2021
@Rutherther
Copy link
Member Author

Unit tests could be written for each condition, step, task, the process.

Xunit, Moq will probably be the best choices.
https://github.com/JonPSmith/EfCore.TestSupport

This may be done after rewriting KosApi and UsermapApi to be more suitable to testing. I think the best approach will be to make them similar to how Remora handles it (create IUsermapPeopleApi, UsermapPeopleApi, CachingPeopleApi)

To test the whole process, integration tests for testing: duplicities won't be allowed if they shouldn't, user with both duplicity will get deleted, the process completes successfully along with saving all needed data and assigning roles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api API plugin change
Projects
None yet
Development

No branches or pull requests

1 participant