You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests pass out of the box irrespective of umask value.
Current Behavior
I cloned jam and ran the tests, and I observed that some tests fail. Specifically, there are some tests (e.g. this one) that assume the local umask is set to 0022. My default umask was set to 0002, so when I cloned the repo the files were created with permissions: 0775 instead of the assumed 0755.
Possible Solution
There are two possible ways to fix this, depending on whether jam should preserve the original permissions of the files being bundled:
Update the tests to verify the bundled permissions are the same as the original file permissions. Do this if we don't particularly care what the file permissions of the bundled files are.
OR
Explicitly write the desired permissions when bundling the file (similar to this). Do this if we want to be sure that the bundled files have known permissions.
=== RUN TestUnitInternal/jam/internal/FileBundler/Bundle/returns_a_list_of_cargo_files
file_bundler_test.go:53:
Expected
<fs.FileMode>: 509
to equal
<fs.FileMode>: 493
Motivations
I am trying to run the jam tests locally and it is inconvenient to have to temporarily change my umask before cloning (or manually update the permissions of all relevant files after cloning).
The text was updated successfully, but these errors were encountered:
I'm going to close this issue. There have been no other reports of umask-related test failures since I created this issue. It might be that my machine was set up in an unusually-restricted state.
Expected Behavior
Tests pass out of the box irrespective of
umask
value.Current Behavior
I cloned
jam
and ran the tests, and I observed that some tests fail. Specifically, there are some tests (e.g. this one) that assume the localumask
is set to0022
. My defaultumask
was set to0002
, so when I cloned the repo the files were created with permissions:0775
instead of the assumed0755
.Possible Solution
There are two possible ways to fix this, depending on whether
jam
should preserve the original permissions of the files being bundled:OR
Steps to Reproduce
Run the following commands
umask = 0022
git clone https://github.com/paketo-buildpacks/jam /tmp/jam
cd /tmp/jam
go test -v ./internal/...
Observe test failures e.g.:
Motivations
I am trying to run the
jam
tests locally and it is inconvenient to have to temporarily change myumask
before cloning (or manually update the permissions of all relevant files after cloning).The text was updated successfully, but these errors were encountered: