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

[MAINTENANCE] Added additional repository functional test instead of unit tests. #895

Merged

Conversation

haogatyp
Copy link
Collaborator

Instead of unit testing repositories it is recommended to do functional tests.

@sebastian-meyer sebastian-meyer added 🛠 maintenance A task to keep the code up-to-date and manageable. ⭐ development fund 2022 A candidate for the Kitodo e.V. development fund. labels Jan 30, 2023
@sebastian-meyer sebastian-meyer changed the title Added additional repository functional test instead of unit tests. [MAINTENANCE] Added additional repository functional test instead of unit tests. Jan 30, 2023
@sebastian-meyer
Copy link
Member

Could you please bring this pull request up to date with master? Alternatively you can allow me to update your branch, then I can do it myself via GitHub most of the time.

@haogatyp
Copy link
Collaborator Author

haogatyp commented Feb 6, 2023

I did a rebase on the current master.

@oliver-stoehr
Copy link
Contributor

oliver-stoehr commented Oct 26, 2023

@sebastian-meyer we have to remove the temporary file in TokenRepositoryTest.php:46, but according to Codacy
The use of function shell_exec() is forbidden and
The use of function unlink() is discouraged.
Do you see any other way to remove the file or should I use unlink as it is "just" discouraged?
(I will fix the other Codacy issues.)

@sebastian-meyer
Copy link
Member

Yes, please revert this back to unlink(), since this is more portable than shell_exec() (which only works on UNIX and is disabled on many shared hosting services for security reasons). I'll then look into which rule actually discourages using unlink() and how to make an exception in this case.

@sebastian-meyer sebastian-meyer merged commit 5310a15 into kitodo:master Oct 26, 2023
6 checks passed
@oliver-stoehr oliver-stoehr deleted the RepositoryFunctionalTest branch October 26, 2023 12:03
@sebastian-meyer sebastian-meyer linked an issue Feb 1, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ development fund 2022 A candidate for the Kitodo e.V. development fund. 🛠 maintenance A task to keep the code up-to-date and manageable.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FUND] Add tests and significantly improve test coverage
3 participants