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

fix: use the proper logs for filebrowser and add generic testBaseLine function #418

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

phorcys420
Copy link
Member

@phorcys420 phorcys420 commented Mar 31, 2025

Follow-up to #400 that fixes the tests.

  • Added the bash and curl deps
  • Made the script stricter via set -euo pipefail (previously, the script was completely failing due to unknown commands but exit code was 0, hence why tests passed even though our testing setup was broken)
  • Removed the toEqual calls and replaced them with toContains to avoid the tests breaking if the log lines aren't exactly what is set.

The new script version doesn't log command (e.g "Running 'filebrowser --noauth --root /home/coder/project --port 13339 --baseurl ' ") so I also removed that, but I could reimplement this because we only test for the exit code and generic logs now, but we don't actually check if the proper command is ran.

In the long-term, we should overhaul our testing to do proper e2e testing (e.g actually runnign healthchecks on the modules' backend), but in the mean-time we should also make all of our scripts stricter to be able to actually catch these issues.

@phorcys420 phorcys420 enabled auto-merge (squash) March 31, 2025 08:22
Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

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

I'm a bit confused isn't this just formatting?

@kylecarbs
Copy link
Member

Oh, oops. My diff just showed the formatting, but looks good.

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

Successfully merging this pull request may close these issues.

3 participants