Merge pull request #148 from joshrabinowitz/small-fixes

fix typos and bug in test_cat.bats
pull/151/head
Josh Rabinowitz 6 years ago committed by GitHub
commit d216f91bd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,12 +11,12 @@ AVM_VERSION="v1.0.0"
export ANSIBLE_VERSIONS_0="2.3.1.0"
export INSTALL_TYPE_0="pip"
export ANSIBLE_LABEL_0="v2.3"
## Install Ansible 2.4.1 using pip and label it 'v2.4'
export ANSIBLE_VERSIONS_1="2.4.1.0"
## Install Ansible 2.5.X using pip and label it 'v2.5'
export ANSIBLE_VERSIONS_1="2.5.0.0"
export INSTALL_TYPE_1="pip"
export ANSIBLE_LABEL_1="v2.4"
export ANSIBLE_LABEL_1="v2.5"
# Whats the default version
export ANSIBLE_DEFAULT_VERSION="v2.4"
export ANSIBLE_DEFAULT_VERSION="v2.5"
## Create a temp dir to download avm
avm_dir="$(mktemp -d 2> /dev/null || mktemp -d -t 'mytmpdir')"

@ -12,8 +12,9 @@ function update_linux() {
function install_ansible {
bash .ci/ansible-setup.sh
bundle install
~/.avm/v2.3/venv/bin/pip install netaddr ansible-lint
~/.avm/v2.4/venv/bin/pip install netaddr ansible-lint
# pyOpen, ndg-* and pyasn1 are for 'InsecurePlatformWarning' error
~/.avm/v2.3/venv/bin/pip install netaddr ansible-lint pyOpenSSL ndg-httpsclient pyasn1
~/.avm/v2.5/venv/bin/pip install netaddr ansible-lint pyOpenSSL ndg-httpsclient pyasn1
}

@ -11,7 +11,7 @@ provisioner:
ansible_verbose: false
require_ansible_repo: false
require_ansible_omnibus: true
ansible_version: 2.4.1
ansible_version: 2.5.0
require_chef_for_busser: false
sudo_command: sudo -E -H
idempotency_test: false

@ -2,7 +2,7 @@
## Version 0.2.4
- Added `git secret cat` feature
- Added `git secret cat` feature (#141)
## Version 0.2.3
@ -22,14 +22,14 @@
- Change how the `usage` command works (#48)
- Now `git-secret` works from any place inside `git-tree` (#56)
- Added `-d` option to the `hide` coomand: it deletes unencrypted files (#62)
- Added `-d` option to the `hide` command: it deletes unencrypted files (#62)
- Added new command `changes` to see the diff between the secret files (#64)
- Fixed bug when `_user_required` was not working after reimporting keys (#74)
- Now it is possible to provide multiple emails to the `killperson` command (#73)
- Now it is possible to provide multiple emails to the `tell` command (#72)
- Now every doc in this project refer to `git-secret.io` instead of old `gh-pages` website (#71)
- Now installation section is removed from main `man` file (#70)
- Now "See also" section in the `man`s are clickable (#69)
- Now "See also" sections in the `man` pages are clickable (#69)
- Added "Manual" section to the manuals (#61)
- Added `centos` container for `ci` testing (#38)
- 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 (#52)
@ -66,7 +66,7 @@
- Added `--dry-run` option to the `git secret` command, which prevents any actions.
- Now `install_full_fixture()` returns a fingerprint
- Now `uninstall_full_fixture()` receives two args
- Fixed bug, when tests were failing with `gpg2`
- Fixed bug when tests were failing with `gpg2`
- New travis strategy: testing both `gpg` and `gpg2`
- Removed animation from docs, now using `asciinema.org`

@ -72,7 +72,7 @@ function teardown {
# https://github.com/sobolevn/git-secret/issues/85 task 1
if [[ "$BATS_RUNNING_FROM_GIT" -eq 1 ]]; then
skip "this test is skiped while 'git commmit'"
skip "this test is skipped while 'git commmit'"
fi
# Preparations:
@ -105,7 +105,7 @@ function teardown {
@test "run 'add' for relative path" {
if [[ "$BATS_RUNNING_FROM_GIT" -eq 1 ]]; then
skip "this test is skiped while 'git commmit'"
skip "this test is skipped while 'git commmit'"
fi
# Prepations:

@ -38,7 +38,7 @@ function teardown {
}
@test "run 'cat' with wrong filename" {
run git secret reveal -d "$TEST_GPG_HOMEDIR" -p "$password" NO_SUCH_FILE
run git secret cat -d "$TEST_GPG_HOMEDIR" -p "$password" NO_SUCH_FILE
[ "$status" -eq 2 ]
}

@ -35,7 +35,7 @@ function teardown {
# https://github.com/sobolevn/git-secret/issues/83
if [[ "$BATS_RUNNING_FROM_GIT" -eq 1 ]]; then
skip "this test is skiped while 'git commmit'"
skip "this test is skipped while 'git commmit'"
fi
# Preparations

@ -55,11 +55,11 @@ function _has_line {
[ "$other_files" -eq 0 ]
# Both files should be present:
local first_enctypted_file=$(_get_encrypted_filename $FIRST_FILE)
local second_enctypted_file=$(_get_encrypted_filename $SECOND_FILE)
local first_encrypted_file=$(_get_encrypted_filename $FIRST_FILE)
local second_encrypted_file=$(_get_encrypted_filename $SECOND_FILE)
[ -f "$first_enctypted_file" ]
[ -f "$second_enctypted_file" ]
[ -f "$first_encrypted_file" ]
[ -f "$second_encrypted_file" ]
}
@ -74,11 +74,11 @@ function _has_line {
[ "$second_line" -eq 1 ]
# Both files should be present:
local first_enctypted_file=$(_get_encrypted_filename $FIRST_FILE)
local second_enctypted_file=$(_get_encrypted_filename $SECOND_FILE)
local first_encrypted_file=$(_get_encrypted_filename $FIRST_FILE)
local second_encrypted_file=$(_get_encrypted_filename $SECOND_FILE)
[ -f "$first_enctypted_file" ]
[ -f "$second_enctypted_file" ]
[ -f "$first_encrypted_file" ]
[ -f "$second_encrypted_file" ]
}
@ -101,8 +101,8 @@ function _has_line {
local mapping_contains=$(_has_line "$file_in_folder")
[ "$mapping_contains" -eq 1 ]
local enctypted_file=$(_get_encrypted_filename $file_in_folder)
[ -f "$enctypted_file" ]
local encrypted_file=$(_get_encrypted_filename $file_in_folder)
[ -f "$encrypted_file" ]
# Cleaning up:
rm -r "$folder"
@ -118,11 +118,11 @@ function _has_line {
local mapping_contains=$(_has_line "$SECOND_FILE")
[ "$mapping_contains" -eq 1 ]
local first_enctypted_file=$(_get_encrypted_filename $FIRST_FILE)
local second_enctypted_file=$(_get_encrypted_filename $SECOND_FILE)
local first_encrypted_file=$(_get_encrypted_filename $FIRST_FILE)
local second_encrypted_file=$(_get_encrypted_filename $SECOND_FILE)
echo "$output"
echo "$first_enctypted_file and $second_enctypted_file"
echo "$first_encrypted_file and $second_encrypted_file"
[ -f "$first_enctypted_file" ]
[ ! -f "$second_enctypted_file" ]
[ -f "$first_encrypted_file" ]
[ ! -f "$second_encrypted_file" ]
}

@ -126,7 +126,7 @@ function teardown {
@test "run 'tell' in subfolder" {
if [[ "$BATS_RUNNING_FROM_GIT" -eq 1 ]]; then
skip "this test is skiped while 'git commmit'"
skip "this test is skipped while 'git commmit'"
fi
# Preparations

@ -34,7 +34,7 @@ function teardown {
@test "run 'whoknows' in subfolder" {
if [[ "$BATS_RUNNING_FROM_GIT" -eq 1 ]]; then
skip "this test is skiped while 'git commmit'"
skip "this test is skipped while 'git commmit'"
fi
# Preparations:

@ -8,7 +8,7 @@ if [[ "$BRANCH_NAME" != '(no branch)' ]]; then
unset GIT_WORK_TREE
# Set marker, that we running tests from `git commit`,
# so some tests will be skiped. It is done, because `git rev-parse`
# so some tests will be skipped. It is done, because `git rev-parse`
# is not working when running from pre-commit hook.
export BATS_RUNNING_FROM_GIT=1

Loading…
Cancel
Save