Commit Graph

44 Commits (master)

Author SHA1 Message Date
Josh Rabinowitz 549cd9aa24
Issue 706 decrypt errors (#831)
* check for encrypted version of file before decrypting, for #706
* improve error messages, verbose output and non-verbose output
* in tests, prefix output from git init with 'git: '
* 'clean' options only remove added files, for #833
* update changelog
2 years ago
Nikita Sobolev a97dd7ffa8
`SECRETS_TEST_VERBOSE` can be `0` (#816)
* `SECRETS_TEST_VERBOSE` can be `0`

* Update _git_secret_tools.sh
2 years ago
Josh Rabinowitz db03c638d5
in verbose mode, show some gnupg perm warnings (#812)
* set git-secret keys dir to 700 perms, for #811
* update changelog
* test improvements
* clean up comments
* remove unused code
* update git-secret-init man page
* document change to git-secret-init
2 years ago
Josh Rabinowitz 563ae4ec82
improve testing gitignore, add verbose test on osx (#800)
* Improve testing of .gitignore contents
* add an automated verbose output test on osx
* rename variables, comment improvements
2 years ago
Josh Rabinowitz eefa10623a
changes to .gitignore usage and testing in response to #789 (#791)
* test .gitignore has expected line count, for #792
* let 'add' append filenames to .gitignore in tests
* add comments related to #789
* fix test to allow for more output from 'add'
* improve error message output
* allow for extra output from 'add' in test
* tweaks as per shellcheck lint
* improve comments, cleanup code
* update changelog
* describe test better
2 years ago
Josh Rabinowitz 23acae1265
Issue 630 hide armored2 (#661)
* use gpg --armor when hiding/encrypting files

* update changelog

* Adds SECRETS_GPG_ARMOR env variable

* Fixes lint

* One more test

* Addresses review

Co-authored-by: sobolevn <mail@sobolevn.me>
3 years ago
Pedro Sobota ac3b77a5bc
Newline not added to .gitignore entry on add (#645)
* Fix Newline not added to .gitignore entry on add (#643)
* Updates to CHANGELOG.md
* Add tests
3 years ago
Nikita Sobolev 19941f91f4
Adds release-ci script to test installation (#664)
* Adds release-ci script to test installation

* Fixes CI

* Fixes CI

* Renames some variables to follow the same SECRETS_ convention
3 years ago
sobolevn 22d994c372 Adds alpine tests 3 years ago
Sasha Friedenberg 39ab72f866
add bash string escaping to _add_ignored_file (#626) 4 years ago
Josh Rabinowitz 9348cd32e2
Revert "Issue 554 show gpg commands (#556)" (#559)
This reverts commit 9e8438236c.
5 years ago
Josh Rabinowitz 9e8438236c
Issue 554 show gpg commands (#556)
* show most gpg commands used for 'hide', 'reveal', 'tell' and 'killperson (#554)
* fix hang when using ctrl-c during tests (#558)
5 years ago
Josh Rabinowitz 525305d985
Issue 527 key with comment (#528)
* add key fixture with no email, and 2 word comment
* tests for key without email and with comment
* handle comments in public key uids
* fix tests, you have to use email address
* fix text
* confirm that email addresses contain an @ symbol
* improve comments about keys/fixtures
5 years ago
Josh Rabinowitz 9ff559ca8c
Issue 478 tests in busybox (#523)
* use busybox by not installing coreutils on alpine
* changes for busybox version of ps and stat
* add function to check if exe is from busybox
* update changelog
* cleanup comments, code, and commented out code
* improve comment in alpine Dockerfile
* include platform-specific funcs so we can test perms
5 years ago
Josh Rabinowitz 10fa2a7be2
Tempfile and temp directory cleanups (#473)
* Tempfile and temp directory cleanups
    Add comments about mktemp on different platforms
    Be more careful about tempfile cleanups
    Don't use find to locate files to cleanup
    Use shorter SECRETS_EXTENSION and SECRETS_DIR env settings in tests
    Set TMPDIR in tests again
    Show DESTDIR used when testing git-secret install
    Change filename passed to mktemp -t in tests
5 years ago
Josh Rabinowitz 2341d1433b
Temp dir fixes (#449)
* perform our test install into TMPDIR
* fix typo
* remove duplicate entry in CHANGELOG.md
* improve commenting
5 years ago
Josh Rabinowitz cb1636a6dc
experimental SECRETS_TEST_VERBOSE shows debug info during tests (#446)
* add a travis target using SECRETS_TEST_VERBOSE=1
* Document SECRETS_TEST_VERBOSE as experimental
* note experimental feature may change or be removed
5 years ago
Jonas Karlsson 54f74ede6a Fix for windows (#375)
* add test for travis-ci windows support
* Make 'ps' command options platform specific *nix/windows
* Add _clean_path for windows,  apply to all homedir input arguments
* export GITSECRET_DIST="windows" in git hook if running windows
* Bash lint fixes
5 years ago
Josh Rabinowitz 8adb7d5741
Revert "use pgrep & kill $pid, not ps+gawk+regex+system+kill (#400)" (#405)
This reverts commit a2a9bd32ba.
5 years ago
Josh Rabinowitz a2a9bd32ba
use pgrep & kill $pid, not ps+gawk+regex+system+kill (#400)
* use pgrep & kill, not ps+gawk+regex+system+kill
* install shellcheck and enable lint on macos/brew.
* add shellcheck fixes and exception
* reorder CHANGELOG entries
5 years ago
Josh Rabinowitz c4331693f3
use 'kill', not 'kill -9' (#379) 5 years ago
Josh Rabinowitz 505cb1fe42 have lint target run shellcheck over tests (closes #373)
* have lint target run shellcheck over tests

* lint and fix tests/ since shellcheck knows bats

* lint and fix tests/ since shellcheck knows bats

* revert debug output

* changes for shellcheck

* revert unintended change

  [tests/_test_base.bash]

* use 'local' for user/filename vars, not 'export'

* add note about Shellcheck and tests/

* local can only be used in functions - use export

* restore shbang edited in error
5 years ago
Josh Rabinowitz 913d026537
Fixes for 'changes' and trailing newlines, for #291 (#293)
* tests and comments about 'changes' for #291
* add 'changes' tests, improve diagnostic 
* preserve trailing newlines in diff output
* use bash trickery to preserve trailing newlines in captured text
* test 'changes' on files without newlines and when called on a non-existant file
* improve comments and variable names
6 years ago
Josh Rabinowitz 74f8a07166
improve testing regarding expired keys and keys with only email addresses (#262)
* test that hiding secret with expired key fails
* add test of user key without username.
* revert to performing most tests with 'user1'.
* move user4 private/public key fixtures
* factor code fetching emails from keyrings, add comments.
* use factored _warn_or_abort()
* add to, clean up, and clarify comments.
6 years ago
Josh Rabinowitz 9e975e4eed make sure email addresses used with 'tell' and 'killperson' exist in keyring (#267)
* name keys after emails, not usernames

* use emails to specify users

* rename and add function to get emails from keyrings
* rename directories holding gpg test fixtures

* deny emails that aren't in the keyring, and test.

* require 'killperson' emails to exist in keyring

* change test to reflect killperson must use email

* remove no-longer-needed test function

* factor function _assert_keychain_contains_emais()

* fix/make lint happy
6 years ago
Josh Rabinowitz 246825c658
fix for keys with only emails, and no usernames. Closes #227 (#240)
* test and fix for keys with only emails, and no usernames. Closes #227
6 years ago
joshr c141fd4492 test with filenames with spaces 6 years ago
Josh Rabinowitz 5d97c66e90 for testing, use bats-core v1.0.2, not bats 6 years ago
Josh Rabinowitz 553eae53f7
Revert "migrate from bats to bats-core (redux)" 6 years ago
Josh Rabinowitz bde7a3ca90 migrate from bats to bats-core (redux) 6 years ago
Josh Rabinowitz bfa3015394
Revert "migrate from bats to bats-core " 6 years ago
joshr 84f9605519 use bats-core 6 years ago
Carlos Hernandez 1c10408734 Make test compatible with macos ps 7 years ago
Carlos Hernandez 9d1125b1bb Workaround bug in gpg v2.0.22 where rc 2 is return on decryption. 7 years ago
Carlos Hernandez fea9c3201d Remove left over files from tests 7 years ago
Carlos Hernandez f9b70fbd16 Added fixes for gnupg >= 2.1 7 years ago
Carlos Hernandez 6ced466a84 Making test compat with gnupg 2.1 7 years ago
sobolevn 9d0a2ac1c1
Adds fixes to subdirectories bug.
Changes:
1. Fixes #86, now all variables are accessed as functions
2. Fixes #85, now these use cases are working correctly
3. Fixes #83, now init works relative to `.git` folder
4. Closes #77, zsh-plugin is deprecated
5. Refs #53, done some refactoring to tests
6. Closes #82, added additional information to pull-request template
7. Refs #22, plugins are deprecated
8. Also made a lot of improvments into both code and tests
7 years ago
sobolevn 728371912e
Version 0.2.2 pre-release
There are a lot of changes, multiple things were refactored: tests,
some commands, building and meta.

Several critical bugs fixed.

Changes:
1. Fixed #74, when `_user_required` was not working after reimporting keys
2. Closes #73, now it is possible to provide multiple emails to the `killperson` command
3. Closes #72, now it is possible to provide multiple emails to the `tell` command
4. Closes #71, now every doc in this project refer to `git-secret.io` instead of old `gh-pages` website
5. Closes #70, now installation section is removed from main `man` file
6. Closes #69, now "See also" section in the `man`s are clickable
7. Closes #61, added "Manual" section to the manuals
8. Refs #38, added `centos` Dockerfile, but `ci` testing is still failing
9. Refs #52, tests are refactored. Added `clean` command tests, removed a lot of hardcoded things, moved tests execution from `./temp` folder to `/tmp`, added a lot of new check in old tests, and some new test cases
10. Refactored `hide` and `clean` commands to be shorter
11. `shellcheck` is now supported with `make lint`

Additional features are not comming to 0.2.2 after this commit.
7 years ago
sobolevn f099802324
Fixed several issues
Changes:
1. Fixed typo in tests_base
2. Fixed `--no-index` issue
3. Refactored `add` test to be more strict

Closes #50
Refernces #46
8 years ago
sobolevn 8b1a01f1f6
This commit is pretty large. A lot of changes.
The full list of changes:
1. Added `.docker/` folder with Dockerfiles
2. Now `travis` runs integrational tests inside these containers
3. Now `travis` runs tests with `mac os x`
4. Now there are new ways to autodeploy `deb` and `rpm` packages
5. Fixed some issues
6. Also added `.ci/` folder, where utility scripts for travis are stored
7. Moved `git-hooks` into the separate folder: `utils/hooks/`
8. Added new target to the `Makefile`
9. `.gitignore` is updated to ignore `build/` folder and inner files
8 years ago
sobolevn b176040a83 Changed the way tests were handling `git-commit`. Since CI was failing.
Changed it to set `user.name` and `user.email`.
8 years ago
sobolevn 1161098f12 Fixes the `gpg2` issue by changing the way fixture installation and uninstallation were handled.
Also `--dry-run` option was added to the `git-secret` command.
8 years ago
sobolevn b370149e18 fixes after makefile crash 8 years ago