elasticdog / transcrypt

transparently encrypt files within a git repository
MIT License
1.45k stars 102 forks source link

Improve testing #184

Open andreineculau opened 1 week ago

andreineculau commented 1 week ago

I don't know the details, but I have just ran the tests locally bats tests only to find out that ~/.gitconfig and ~/.gitattributes_global are modified.

jmurty commented 1 week ago

Hi @andreineculau I have fixed one potential place where global Git configs could be set by running bats tests/ in commit f88979c6.

I'm not sure how your _~/.gitattributesglobal file is being modified, the tests should all write directly to a .gitattributes files in the local temporary test directory as set by bats in the envvar $BATS_TEST_DIRNAME.

andreineculau commented 1 week ago

Nice! 🦸

I didn't have time to check, but I have ~/.gitattributes_global set via git config --global core.attributesfile ~/.gitattributes_global and as it happens it's a symlink. Tests were failing because text-replace didn't work on symlinks.