Skip to content

Commit 8cf9221

Browse files
authored
Merge pull request #381 from oracle/fix_wercker_t3channel_test
Fix wercker t3channel test
2 parents b1ba8bc + da44dac commit 8cf9221

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/integration-tests/bash/run.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1921,6 +1921,7 @@ EOF
19211921
# - local --> run locally - requires java & weblogic to be installed
19221922
# - remote --> run remotely on admin server, construct URL using admin pod name
19231923
# - hybrid --> run remotely on admin server, construct URL using 'NODEPORT_HOST'
1924+
# or 'K8S_NODEPORT_IP' in wercker since NODEPORT_HOST sometimes does not work in OCI
19241925
#
19251926
function run_wlst_script {
19261927
if [ "$#" -lt 3 ] ; then
@@ -1943,7 +1944,12 @@ function run_wlst_script {
19431944
local password=`get_wladmin_pass $1`
19441945
local pyfile_lcl="$3"
19451946
local pyfile_pod="/shared/`basename $pyfile_lcl`"
1946-
local t3url_lcl="t3://$NODEPORT_HOST:$ADMIN_WLST_PORT"
1947+
if [ "$WERCKER" = "true" ]; then
1948+
# use OCI public IP in wercker
1949+
local t3url_lcl="t3://$K8S_NODEPORT_IP:$ADMIN_WLST_PORT"
1950+
else
1951+
local t3url_lcl="t3://$NODEPORT_HOST:$ADMIN_WLST_PORT"
1952+
fi
19471953
local t3url_pod="t3://$AS_NAME:$ADMIN_WLST_PORT"
19481954
local wlcmdscript_lcl="$TMP_DIR/wlcmd.sh"
19491955
local wlcmdscript_pod="/shared/wlcmd.sh"
@@ -2032,6 +2038,7 @@ EOF
20322038

20332039
if [ "$result" = "0" ];
20342040
then
2041+
cat ${pyfile_lcl}.out
20352042
break
20362043
fi
20372044

@@ -2205,9 +2212,10 @@ function verify_service_and_pod_created {
22052212
local EXTCHANNEL_T3CHANNEL_SERVICE_NAME=${SERVICE_NAME}-extchannel-t3channel
22062213
trace "checking if service ${EXTCHANNEL_T3CHANNEL_SERVICE_NAME} is created"
22072214
count=0
2215+
srv_count=0
22082216
while [ "${srv_count:=Error}" != "1" -a $count -lt $max_count_srv ] ; do
22092217
local count=`expr $count + 1`
2210-
local srv_count=`kubectl -n $NAMESPACE get services | grep "^$SERVICE_NAME " | wc -l`
2218+
local srv_count=`kubectl -n $NAMESPACE get services | grep "^$EXTCHANNEL_T3CHANNEL_SERVICE_NAME " | wc -l`
22112219
if [ "${srv_count:=Error}" != "1" ]; then
22122220
trace "Did not find service $EXTCHANNEL_T3CHANNEL_SERVICE_NAME, iteration $count of $max_count_srv"
22132221
sleep $wait_time
@@ -2258,6 +2266,9 @@ function verify_service_and_pod_created {
22582266
fi
22592267

22602268
if [ "${IS_ADMIN_SERVER}" = "true" ]; then
2269+
trace "listing pods"
2270+
kubectl -n $NAMESPACE get pods -o wide
2271+
22612272
verify_wlst_access $DOM_KEY
22622273
fi
22632274
}

wercker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ integration-test:
108108
109109
# Update KUBECONFIG for K8S cluster
110110
export K8S_NODEPORT_HOST="${OCI_K8S_WORKER0_HOSTNAME}"
111+
export K8S_NODEPORT_IP="${OCI_K8S_WORKER0_IP}"
111112
sed -i -e "s,%ADDRESS%,https://$OCI_K8S_MASTER_IP:443,g" $WERCKER_SOURCE_DIR/build/kube.config
112113
sed -i -e "s,%CLIENT_CERT_DATA%,$OCI_K8S_CLIENT_CERT_DATA,g" $WERCKER_SOURCE_DIR/build/kube.config
113114
sed -i -e "s,%CLIENT_KEY_DATA%,$OCI_K8S_CLIENT_KEY_DATA,g" $WERCKER_SOURCE_DIR/build/kube.config

0 commit comments

Comments
 (0)