Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
017f1b30
Commit
017f1b30
authored
Sep 20, 2019
by
Steven Murray
Browse files
Added oracleunittests pod to the system test
parent
9deadf24
Changes
3
Hide whitespace changes
Inline
Side-by-side
continuousintegration/docker/ctafrontend/cc7/opt/run/bin/oracleunittests.sh
0 → 100755
View file @
017f1b30
#!/bin/bash
set
-e
.
/opt/run/bin/init_pod.sh
if
[
!
-e
/etc/buildtreeRunner
]
;
then
yum-config-manager
--enable
cta-artifacts
yum-config-manager
--enable
ceph
yum-config-manager
--enable
castor
# Install missing RPMs
yum
-y
install
mt-st lsscsi sg3_utils cta-taped cta-tape-label cta-debuginfo ceph-common
fi
echo
"Configuring database"
/opt/run/bin/init_database.sh
.
/tmp/database-rc.sh
echo
${
DATABASEURL
}
>
/etc/cta/cta-catalogue.conf
yum
-y
install
cta-catalogueutils cta-systemtests
/usr/bin/cta-rdbmsUnitTests /etc/cta/cta-catalogue.conf
echo
'yes'
| /usr/bin/cta-catalogue-schema-drop /etc/cta/cta-catalogue.conf
/usr/bin/cta-catalogue-schema-create /etc/cta/cta-catalogue.conf
continuousintegration/orchestration/create_instance.sh
View file @
017f1b30
...
...
@@ -255,6 +255,28 @@ fi
kubectl get pod init
-a
--namespace
=
${
instance
}
|
grep
-q
Completed
||
die
"TIMED OUT"
echo
OK
echo
"Running database unit-tests"
kubectl create
-f
${
poddir
}
/pod-oracleunittests.yaml
--namespace
=
${
instance
}
echo
-n
"Waiting for oracleunittests"
for
((
i
=
0
;
i<400
;
i++
))
;
do
echo
-n
"."
kubectl get pod oracleunittests
-a
--namespace
=
${
instance
}
| egrep
-q
'Completed|Error'
&&
break
sleep
1
done
kubectl
--namespace
=
${
instance
}
logs oracleunittests
# database unit-tests went wrong => exit now with error
if
$(
kubectl get pod oracleunittests
-a
--namespace
=
${
instance
}
|
grep
-q
Error
)
;
then
echo
"init pod in Error status here are its last log lines:"
kubectl
--namespace
=
${
instance
}
logs oracleunittests
--tail
10
die
"ERROR: init pod in ErERROR: oracleunittests pod in Error state. Initialization failed."
fi
kubectl get pod init
-a
--namespace
=
${
instance
}
|
grep
-q
Completed
||
die
"TIMED OUT"
echo
OK
echo
"Launching pods"
for
podname
in
client ctacli tpsrv01 tpsrv02 ctaeos ctafrontend kdc
;
do
...
...
continuousintegration/orchestration/pod-oracleunittests.yaml
0 → 100644
View file @
017f1b30
apiVersion
:
v1
kind
:
Pod
metadata
:
name
:
oracleunittests
spec
:
restartPolicy
:
Never
containers
:
-
name
:
oracleunittests
image
:
gitlab-registry.cern.ch/cta/ctageneric:78673git921a9300
stdin
:
true
env
:
-
name
:
MY_CONTAINER
value
:
"
oracleunittests"
-
name
:
MY_NAME
valueFrom
:
fieldRef
:
fieldPath
:
metadata.name
-
name
:
MY_NAMESPACE
valueFrom
:
fieldRef
:
fieldPath
:
metadata.namespace
-
name
:
INSTANCE_NAME
value
:
"
$(MY_NAMESPACE)"
-
name
:
BUILDTREE_BASE
valueFrom
:
configMapKeyRef
:
name
:
buildtree
key
:
base
-
name
:
CTA_BUILDTREE_SUBDIR
valueFrom
:
configMapKeyRef
:
name
:
buildtree
key
:
cta_subdir
-
name
:
EOS_BUILDTREE_SUBDIR
valueFrom
:
configMapKeyRef
:
name
:
buildtree
key
:
eos_subdir
-
name
:
TERM
value
:
"
xterm"
-
name
:
driveslot
value
:
"
0"
command
:
[
'
/opt/run/bin/oracleunittests.sh'
]
args
:
[
"
none"
]
volumeMounts
:
-
mountPath
:
/shared
name
:
shared
-
mountPath
:
/etc/config/objectstore
name
:
myobjectstore
-
mountPath
:
/etc/config/database
name
:
mydatabase
-
mountPath
:
/etc/config/library
name
:
mylibrary
-
mountPath
:
/mnt/logs
name
:
logstorage
securityContext
:
privileged
:
true
volumes
:
-
name
:
shared
hostPath
:
path
:
/opt/cta
-
name
:
myobjectstore
configMap
:
name
:
objectstore-config
-
name
:
mydatabase
configMap
:
name
:
database-config
-
name
:
mylibrary
configMap
:
name
:
library-config
-
name
:
logstorage
persistentVolumeClaim
:
claimName
:
claimlogs
imagePullSecrets
:
-
name
:
ctaregsecret
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment