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

Tests to make sure Signbank has file system permissions and correct paths #1347

Open
susanodd opened this issue Oct 15, 2024 · 0 comments
Open

Comments

@susanodd
Copy link
Collaborator

susanodd commented Oct 15, 2024

While working on the API I came across OS permissions failures to make folders when videos are being uploaded.

  1. The tests run as "root" but Signbank is not being run by root. Permissions need to be scrutinized on all the writable folders.

  2. Check all the places where paths to videos are used. Confirm that the dynamically computed path is as intended.

  3. Add a setting to be turned on during testing in order to run methods themselves and get print statements on the paths. (The tests need to simulate "Debug" mode to step through what the paths are.)

  4. There is lots of inconsistency in how videos are accessed as well as errors creating the still images because a wrong path is given.

  5. Some of the code that uses paths actually needs "strings" not Python "paths". (Modules 'os', 'shutil', 'zipfile') This could differ on the Apache versus the emulated runserver server Python implementation. (The Apache server has a file server.)

  6. Tests to confirm the correct paths are being used everywhere paths are used.
    The paths to videos are particularly inconsistent.

Note: there have been some errors in the tests for a very long time. The tests don't delete the video files and generate a warning that the video file could not be deleted. (If others have run the deploy.sh script they will have noticed this. It's right before the long pause at the end of the tests. If a video file could not be deleted, this causes future errors because other code assumes they have been deleted. Lots of code uses a "pass" if something failed on the file system.)

@susanodd susanodd changed the title Tests to make sure Signbank has permission to create folders Tests to make sure Signbank has file system permissions and correct paths Oct 19, 2024
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

1 participant