Skip to content

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

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

Merged
merged 2 commits into from
Apr 16, 2025

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.

@matifali
Copy link
Member

matifali commented Apr 8, 2025

@phorcys420 are you still on it? If not I can take a look at it.

@phorcys420
Copy link
Member Author

phorcys420 commented Apr 9, 2025

@matifali I thought i'd merged this!
i'll resolve the merge conflicts soon, or you can take a look

@matifali
Copy link
Member

matifali commented Apr 9, 2025

@matifali I thought i'd merged this! i'll resolve the merge conflicts soon, or you can take a look

Yes, please. I may not have time this week. So I can take a look next week if you haven't already.

@matifali matifali disabled auto-merge April 16, 2025 09:31
@matifali matifali force-pushed the fix-filebrowser-tests branch from 6b53f25 to 4248ae2 Compare April 16, 2025 09:35
@matifali matifali merged commit cccee31 into main Apr 16, 2025
5 checks passed
@matifali matifali deleted the fix-filebrowser-tests branch April 16, 2025 09:39
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