Skip to content

Commit

Permalink
tests: Add a second gpg keyring
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlarsson committed May 10, 2017
1 parent b33d6fd commit ec89340
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ Flatpak-1.0.*
/tests/test-keyring/.gpg-v21-migrated
/tests/test-keyring/private-keys-v1.d/
/tests/test-keyring/trustdb.gpg
/tests/test-keyring2/.gpg-v21-migrated
/tests/test-keyring2/private-keys-v1.d/
/tests/test-keyring2/trustdb.gpg
/tests/hello*.flatpak
/tests/platform*.flatpak
/tests/repo
Expand Down
5 changes: 5 additions & 0 deletions tests/libtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,17 @@ assert_file_empty() {
}

export FL_GPG_HOMEDIR=${TEST_DATA_DIR}/gpghome
export FL_GPG_HOMEDIR2=${TEST_DATA_DIR}/gpghome2
mkdir -p ${FL_GPG_HOMEDIR}
mkdir -p ${FL_GPG_HOMEDIR2}
# This need to be writable, so copy the keys
cp $(dirname $0)/test-keyring/*.gpg ${FL_GPG_HOMEDIR}/
cp $(dirname $0)/test-keyring2/*.gpg ${FL_GPG_HOMEDIR2}/

export FL_GPG_ID=7B0961FD
export FL_GPG_ID2=B2314EFC
export FL_GPGARGS="--gpg-homedir=${FL_GPG_HOMEDIR} --gpg-sign=${FL_GPG_ID}"
export FL_GPGARGS2="--gpg-homedir=${FL_GPG_HOMEDIR2} --gpg-sign=${FL_GPG_ID2}"

setup_repo () {
REPONAME=${1:-test}
Expand Down
3 changes: 3 additions & 0 deletions tests/test-keyring2/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
These are completely random keys, which include the secret key.
Use these for testing gpg signing, do *NOT* ever use these for any
real application.
Binary file added tests/test-keyring2/pubring.gpg
Binary file not shown.
Binary file added tests/test-keyring2/secring.gpg
Binary file not shown.

0 comments on commit ec89340

Please sign in to comment.