"core": Shell tests must use the agent
This CL moves the veyron/tool/mgmt and veyron/services/identity
shell tests so that they only use a principal supplied by the agent
(as opposed to the VEYRON_CREDENTIALS directory).
With this CL, all shell tests in the core package would switch to
using the agent.
Change-Id: I986a646381d2b129698402f7fe82f9730b3b6a0c
diff --git a/services/identity/test.sh b/services/identity/test.sh
index 5b30587..471e140 100755
--- a/services/identity/test.sh
+++ b/services/identity/test.sh
@@ -4,6 +4,9 @@
source "$(go list -f {{.Dir}} v.io/core/shell/lib)/shell_test.sh"
+# Run the test under the security agent.
+shell_test::enable_agent "$@"
+
readonly WORKDIR="${shell_test_WORK_DIR}"
build() {
@@ -32,14 +35,12 @@
main() {
cd "${WORKDIR}"
build
-
+
shell_test::setup_server_test || shell_test::fail "line ${LINENO} failed to setup server test"
- unset VEYRON_CREDENTIALS
# Start the identityd server in test identity server.
- shell_test::start_server "${IDENTITYD_BIN}" --host=localhost -veyron.tcp.address=127.0.0.1:0
+ shell_test::start_server "${VRUN}" "${IDENTITYD_BIN}" --host=localhost -veyron.tcp.address=127.0.0.1:0
echo Identityd Log File: $START_SERVER_LOG_FILE
- export VEYRON_CREDENTIALS="$(shell::tmp_dir)"
# Test an initial seekblessings call, with a specified VEYRON_CREDENTIALS.
WANT="Received blessings"