Commit Graph

31 Commits

Author SHA1 Message Date
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
2019-08-30 09:35:47 -04:00
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
2019-05-21 12:06:51 -04:00
Josh Rabinowitz
2341d1433b
Temp dir fixes (#449)
* perform our test install into TMPDIR
* fix typo
* remove duplicate entry in CHANGELOG.md
* improve commenting
2019-03-29 18:11:52 -04:00
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
2019-03-28 07:41:07 -04:00
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
2019-03-09 18:49:45 -05:00
Josh Rabinowitz
8adb7d5741
Revert "use pgrep & kill $pid, not ps+gawk+regex+system+kill (#400)" (#405)
This reverts commit a2a9bd32ba.
2019-03-09 13:14:44 -05:00
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
2019-03-09 10:14:47 -05:00
Josh Rabinowitz
c4331693f3
use 'kill', not 'kill -9' (#379) 2019-03-07 15:17:51 -05:00
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
2019-03-04 17:40:35 +03:00
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
2019-01-01 09:37:11 -05:00
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.
2018-12-01 08:48:09 -05:00
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
2018-09-26 00:08:44 +03:00
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
2018-07-17 12:01:16 -04:00
joshr
c141fd4492 test with filenames with spaces 2018-07-14 15:23:17 -04:00
Josh Rabinowitz
5d97c66e90 for testing, use bats-core v1.0.2, not bats 2018-06-20 09:56:25 -04:00
Josh Rabinowitz
553eae53f7
Revert "migrate from bats to bats-core (redux)" 2018-06-19 09:22:56 -04:00
Josh Rabinowitz
bde7a3ca90 migrate from bats to bats-core (redux) 2018-06-13 12:03:25 -04:00
Josh Rabinowitz
bfa3015394
Revert "migrate from bats to bats-core " 2018-06-12 11:24:47 -04:00
joshr
84f9605519 use bats-core 2018-06-09 08:15:32 -04:00
Carlos Hernandez
1c10408734 Make test compatible with macos ps 2017-11-27 09:52:08 -07:00
Carlos Hernandez
9d1125b1bb Workaround bug in gpg v2.0.22 where rc 2 is return on decryption. 2017-11-27 09:50:38 -07:00
Carlos Hernandez
fea9c3201d Remove left over files from tests 2017-09-23 17:58:25 -06:00
Carlos Hernandez
f9b70fbd16 Added fixes for gnupg >= 2.1 2017-09-13 16:06:16 -06:00
Carlos Hernandez
6ced466a84 Making test compat with gnupg 2.1 2017-09-12 10:49:24 -06:00
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
2017-03-06 00:46:49 +03:00
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.
2017-02-26 18:10:51 +03:00
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
2016-10-03 18:44:37 +03:00
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
2016-06-16 22:34:25 +03:00
sobolevn
b176040a83 Changed the way tests were handling git-commit. Since CI was failing.
Changed it to set `user.name` and `user.email`.
2016-05-29 13:56:48 +03:00
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.
2016-04-10 14:14:41 +03:00
sobolevn
b370149e18 fixes after makefile crash 2016-02-21 16:26:17 +03:00