|
|
@ -14,7 +14,6 @@ TEST_SECRETS_DIR="$BATS_TMPDIR/$SECRETS_DIR"
|
|
|
|
TEST_SECRETS_DIR_PATHS_MAPPING="$BATS_TMPDIR/$SECRETS_DIR_PATHS_MAPPING"
|
|
|
|
TEST_SECRETS_DIR_PATHS_MAPPING="$BATS_TMPDIR/$SECRETS_DIR_PATHS_MAPPING"
|
|
|
|
|
|
|
|
|
|
|
|
TEST_GPG_HOMEDIR="$PWD"
|
|
|
|
TEST_GPG_HOMEDIR="$PWD"
|
|
|
|
# TEST_TEMP_FILE="$BATS_TMPDIR/test_temp"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# GPG-based stuff:
|
|
|
|
# GPG-based stuff:
|
|
|
|
: ${SECRETS_GPG_COMMAND:="gpg"}
|
|
|
|
: ${SECRETS_GPG_COMMAND:="gpg"}
|
|
|
@ -22,6 +21,7 @@ GPGTEST="$SECRETS_GPG_COMMAND --homedir=$TEST_GPG_HOMEDIR --no-permission-warnin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Personal data:
|
|
|
|
# Personal data:
|
|
|
|
|
|
|
|
|
|
|
|
TEST_DEFAULT_USER="user1"
|
|
|
|
TEST_DEFAULT_USER="user1"
|
|
|
|
|
|
|
|
|
|
|
|
function test_user_password {
|
|
|
|
function test_user_password {
|
|
|
@ -34,7 +34,6 @@ function test_user_email {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# GPG:
|
|
|
|
# GPG:
|
|
|
|
|
|
|
|
|
|
|
|
function _get_gpg_fingerprint_by_email {
|
|
|
|
function _get_gpg_fingerprint_by_email {
|
|
|
@ -103,6 +102,7 @@ function uninstall_fixture_full_key {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Git:
|
|
|
|
# Git:
|
|
|
|
|
|
|
|
|
|
|
|
function git_set_config_email {
|
|
|
|
function git_set_config_email {
|
|
|
|
git config --local user.email "$1"
|
|
|
|
git config --local user.email "$1"
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -113,12 +113,22 @@ function git_restore_default_email {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function git_commit {
|
|
|
|
|
|
|
|
git_set_config_email "$1"
|
|
|
|
|
|
|
|
git config --local user.name "Your Name"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
git add --all
|
|
|
|
|
|
|
|
git commit -m "$2"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function remove_git_repository {
|
|
|
|
function remove_git_repository {
|
|
|
|
rm -rf ".git"
|
|
|
|
rm -rf ".git"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Git Secret:
|
|
|
|
# Git Secret:
|
|
|
|
|
|
|
|
|
|
|
|
function set_state_git {
|
|
|
|
function set_state_git {
|
|
|
|
git init > /dev/null 2>&1
|
|
|
|
git init > /dev/null 2>&1
|
|
|
|
}
|
|
|
|
}
|
|
|
|