Skip to content

Commit c886918

Browse files
authored
Merge pull request #581 from oracle/sit-cfg-unit-testing
minor comment change
2 parents 521ff6e + 021c110 commit c886918

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

src/integration-tests/introspector/checkBeans.py

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import os
66

77
#
8-
# This program verifies that bean attr values are expected values.
8+
# This program verifies that bean attr values are expected values,
9+
# it can be used to demonstrate situational config overrides.
910
#
1011
# Usage:
1112
#
@@ -28,7 +29,40 @@
2829
# The program exits with a non-zero exit code on any failure
2930
# (including an unexpected attribute value).
3031
#
31-
#
32+
# Sample usage in an Operator k8s WL pod:
33+
# Assumptions:
34+
# Assumes a configuration with 'admin-server' listen-address of localhost, and
35+
# 'managed-server1' listen-address of localhost, and assumes that these have
36+
# been overridden by sit-cfg to be 'domain1-admin-server' and
37+
# 'domain1-managed-server1' respectively.
38+
#
39+
# test_home=/tmp/introspect
40+
# mypod=domain1-admin-server
41+
# infile=$test_home/checkBeans.input
42+
# outfile=$test_home/checkBeans.output
43+
# myns=default
44+
# url=t3://domain1-admin-server:7001
45+
# username=weblogic
46+
# password=welcome1
47+
#
48+
# echo "Info: Checking beans to see if sit-cfg took effect. Input file '$infile', output file '$outfile'."
49+
#
50+
# mkdir $test_home
51+
# echo '/Servers/admin-server,ListenAddress,localhost,domain1-admin-server' > $infile
52+
# echo '/Servers/managed-server1,ListenAddress,localhost,domain1-managed-server1' >> $infile
53+
#
54+
# kubectl -n $myns cp $infile $mypod:/shared/checkBeans.input || exit 1
55+
# kubectl -n $myns cp checkBeans.py $mypod:/shared/checkBeans.py || exit 1
56+
# kubectl -n $myns exec -it $mypod \
57+
# wlst.sh /shared/checkBeans.py \
58+
# $username $password $url \
59+
# /shared/checkBeans.input \
60+
# > $outfile 2>&1
61+
# if [ $? -ne 0 ]; then
62+
# echo "Error: checkBeans failed, see '$outfile'."
63+
# exit 1
64+
# fi
65+
#
3266

3367
admin_username = sys.argv[1]
3468
admin_password = sys.argv[2]

0 commit comments

Comments
 (0)