-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: separate and extend keymanager tests
- Loading branch information
Showing
4 changed files
with
62 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
|
||
############################################################ | ||
# This script tests the Ekiden dummy key manager. | ||
# | ||
# Usage: | ||
# test_dummy_keymanager.sh [-w <workdir>] | ||
############################################################ | ||
|
||
# Defaults. | ||
WORKDIR=$(pwd) | ||
|
||
######################### | ||
# Process test arguments. | ||
######################### | ||
while getopts 'f:t:' arg | ||
do | ||
case ${arg} in | ||
w) WORKDIR=${OPTARG};; | ||
*) | ||
echo "Usage: $0 [-w <workdir>]" | ||
exit 1 | ||
esac | ||
done | ||
|
||
# Helpful tips on writing build scripts: | ||
# https://buildkite.com/docs/pipelines/writing-build-scripts | ||
set -euxo pipefail | ||
|
||
source .buildkite/scripts/common.sh | ||
source .buildkite/scripts/common_e2e.sh | ||
source .buildkite/rust/common.sh | ||
|
||
# Test the key manager node. | ||
test_keymanager() { | ||
sleep 3 | ||
|
||
${WORKDIR}/target/debug/ekiden-keymanager-test-client \ | ||
--mrenclave $(cat ${WORKDIR}/target/enclave/ekiden-keymanager-trusted.mrenclave) \ | ||
--tls-certificate ${WORKDIR}/tests/keymanager/km.pem | ||
} | ||
|
||
# Test minimal configuration. | ||
run_keymanager_node | ||
test_keymanager | ||
cleanup | ||
|
||
# Test with provided internal keys. | ||
run_keymanager_node --internal-keys "${WORKDIR}/tests/keymanager/internal-keys.cbor" | ||
test_keymanager | ||
cleanup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.