From 8285dc9c620bd0b76243138bf252f949fb90f7b4 Mon Sep 17 00:00:00 2001
From: Julien Leduc <julien.leduc@cern.ch>
Date: Tue, 21 Nov 2017 17:10:58 +0100
Subject: [PATCH] adding poweruser1 EOS commands in the client.

---
 .../orchestration/tests/client_helper.sh      | 20 +++++++++++++++++++
 .../orchestration/tests/prepare_tests.sh      |  1 +
 2 files changed, 21 insertions(+)

diff --git a/continuousintegration/orchestration/tests/client_helper.sh b/continuousintegration/orchestration/tests/client_helper.sh
index a7d50e7d04..39378762c4 100644
--- a/continuousintegration/orchestration/tests/client_helper.sh
+++ b/continuousintegration/orchestration/tests/client_helper.sh
@@ -10,6 +10,7 @@
 # admin_kdestroy: kdestroy for CTAADMIN_USER
 # admin_cta: runs a cta command as CTAADMIN_USER 
 
+EOSPOWER_USER="poweruser1"
 CTAADMIN_USER="ctaadmin2"
 USER="user1"
 
@@ -35,3 +36,22 @@ admin_kdestroy() {
   KRB5CCNAME=/tmp/${CTAADMIN_USER}/krb5cc_0 kdestroy
   admin_klist
 }
+
+eospower_eos() {
+  XrdSecPROTOCOL=krb5 KRB5CCNAME=/tmp/${EOSPOWER_USER}/krb5cc_0 eos $@
+}
+
+eospower_klist() {
+  KRB5CCNAME=/tmp/${EOSPOWER_USER}/krb5cc_0 klist
+}
+
+eospower_kinit() {
+  KRB5CCNAME=/tmp/${EOSPOWER_USER}/krb5cc_0 kinit -kt /root/${EOSPOWER_USER}.keytab ${EOSPOWER_USER}@TEST.CTA
+  eospower_klist
+}
+
+eospower_kdestroy() {
+  KRB5CCNAME=/tmp/${EOSPOWER_USER}/krb5cc_0 kdestroy
+  eospower_klist
+}
+
diff --git a/continuousintegration/orchestration/tests/prepare_tests.sh b/continuousintegration/orchestration/tests/prepare_tests.sh
index 95ea90a518..2afad3da0b 100755
--- a/continuousintegration/orchestration/tests/prepare_tests.sh
+++ b/continuousintegration/orchestration/tests/prepare_tests.sh
@@ -134,3 +134,4 @@ kubectl --namespace ${NAMESPACE} exec ctacli -- cta adminhost add --name ${clien
 kubectl --namespace ${NAMESPACE} exec ctacli -- cta admin add --username ctaadmin2 --comment "ctaadmin2"
 
 kubectl --namespace=${NAMESPACE} exec kdc cat /root/ctaadmin2.keytab | kubectl --namespace=${NAMESPACE} exec -i client --  bash -c "cat > /root/ctaadmin2.keytab; mkdir -p /tmp/ctaadmin2"
+kubectl --namespace=${NAMESPACE} exec kdc cat /root/poweruser1.keytab | kubectl --namespace=${NAMESPACE} exec -i client --  bash -c "cat > /root/poweruser1.keytab; mkdir -p /tmp/poweruser1"
-- 
GitLab