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 run against globally installed flood and not current version #716

Open
1 task done
FinalDoom opened this issue Jan 2, 2024 · 6 comments
Open
1 task done

Comments

@FinalDoom
Copy link
Contributor

Type: Bug Report

  • Try to follow the update procedure described in the README and try again before opening this issue.

Your Environment

Current master e20a2f0 but really any version to date.

Summary

Tests are run through root/server/.jest/*.setup.js using node flood ... command. This fails if flood isn't globally installed.

And since you're trying to validate the current development version, this is wrong anyway. It should be using node dist/index.js ... and have a prerequisite to have built the project (assumed to be the case in current workflows)

Expected Behavior

Run tests against current development version.

Current Behavior

Tests are run against globally installed (very old) version, or "bleeding edge" master version if bodged in, but not current branch/code.

Possible Solution

See summary

Steps to Reproduce

Run npm test and observe behavior, check jest config files, etc.

Context

Correct testing

@trim21
Copy link
Collaborator

trim21 commented Apr 25, 2024

I don't think so, we didn't install flood globally in ci

- run: npm test -- --selectProjects rtorrent || npm test -- --selectProjects rtorrent || npm test -- --selectProjects rtorrent

@FinalDoom
Copy link
Contributor Author

That's not what this ticket is about. This references NPM test https://github.com/jesec/flood/blob/master/package.json#L64
which runs https://github.com/jesec/flood/blob/master/server/.jest/auth.setup.js#L8 et al. This runs global flood.

@trim21
Copy link
Collaborator

trim21 commented Apr 26, 2024

is doesn't, actually. it just override argv so our argv parser could parse config from it.

@trim21
Copy link
Collaborator

trim21 commented Apr 26, 2024

this process.argv is not to be used to start a new process.

@trim21 trim21 closed this as completed Apr 26, 2024
@FinalDoom
Copy link
Contributor Author

FinalDoom commented Apr 26, 2024

Pretty sure I wrote this after discovering it was running against a different version than what I had written. But I don't care enough to re-validate.

IE. the ticket states

This fails if flood isn't globally installed.

That's pretty easy to validate. But I won't do it again.

@trim21 trim21 reopened this Apr 26, 2024
@trim21
Copy link
Collaborator

trim21 commented Apr 26, 2024

maybe another reason causing this

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

No branches or pull requests

2 participants