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 for some reason expect /tmp/$USER to exist? #1945

Open
yarikoptic opened this issue Apr 19, 2024 · 1 comment
Open

Tests for some reason expect /tmp/$USER to exist? #1945

yarikoptic opened this issue Apr 19, 2024 · 1 comment
Labels

Comments

@yarikoptic
Copy link
Contributor

❯ deno test --allow-all --coverage=cov/ src/
Check file:///home/yoh/proj/bids/bids-validator/bids-validator/src/files/browser.test.ts
Check file:///home/yoh/proj/bids/bids-validator/bids-validator/src/files/deno.test.ts
...
test missingLabel ... File with underscores and hyphens doesn't error out. => ./src/validators/filenameValidate.test.ts:34:11
error: NotFound: No such file or directory (os error 2): lstat '/tmp/yoh'
        this.#fileInfo = Deno.lstatSync(this._getPath())
                              ^
    at Object.lstatSync (ext:deno_fs/30_fs.js:415:3)
    at new BIDSFileDeno (file:///home/yoh/proj/bids/bids-validator/bids-validator/src/files/deno.ts:39:31)
    at file:///home/yoh/proj/bids/bids-validator/bids-validator/src/validators/filenameValidate.test.ts:41:18
    at innerWrapped (ext:cli/40_test.js:174:11)
    at exitSanitizer (ext:cli/40_test.js:103:33)
    at Object.outerWrapped [as fn] (ext:cli/40_test.js:117:20)
    at TestContext.step (ext:cli/40_test.js:475:37)
    at file:///home/yoh/proj/bids/bids-validator/bids-validator/src/validators/filenameValidate.test.ts:34:11

 FAILURES 

valid_headers dataset ... summary has correct totalFiles => ./src/tests/local/valid_headers.test.ts:32:11
test hasMatch ... No  match => ./src/validators/filenameIdentify.test.ts:77:11
test hasMatch ... 1+ matched, datatype match => ./src/validators/filenameIdentify.test.ts:90:11
test missingLabel ... File with underscore and no hyphens errors out. => ./src/validators/filenameValidate.test.ts:17:11
test missingLabel ... File with underscores and hyphens doesn't error out. => ./src/validators/filenameValidate.test.ts:34:11

FAILED | 26 passed (105 steps) | 3 failed (5 steps) (3s)

error: Test failed

note above that

error: NotFound: No such file or directory (os error 2): lstat '/tmp/yoh'

FWIW nothing should rely on/use some fixed filename under $TMPDIR - security hazard!

@effigies
Copy link
Collaborator

I believe this results from not having the submodules checked out.

Agree this shouldn't be happening.

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

No branches or pull requests

2 participants