Skip to content

Commit ef0deb6

Browse files
author
Tom Barnes
committed
Minor tweaks.
1 parent ef2be5f commit ef0deb6

File tree

3 files changed

+26
-12
lines changed

3 files changed

+26
-12
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/Servers/admin-server,ListenAddress,,domain1-admin-server
2-
/Servers/admin-server,ListenAddress,foob,domain1-admin-server
2+
#/Servers/admin-server,ListenAddress,foob,domain1-admin-server
33
#/Servers/admin-server,ListenAddress,,foob
44
#/Servers/admin-server,ListenAddress,,
5+
#,
56

src/integration-tests/introspector/checkBeans.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
# For example:
1616
# /Servers/admin-server,ListenAddress,,domain1-admin-server
1717
#
18+
#
19+
# Then run this program:
20+
# wlst.sh checkBeans admin_name admin_pass url input_file_name
21+
#
1822
# The program will check that the original-val matches the value
1923
# in the 'domainConfig' mbean tree and that the overridden-val
2024
# matches the value in the 'serverConfig' mbean tree.
@@ -26,13 +30,10 @@
2630

2731
admin_username = sys.argv[1]
2832
admin_password = sys.argv[2]
29-
input_file = sys.argv[3]
30-
31-
admin_port=os.getenv('LOCAL_SERVER_DEFAULT_PORT')
33+
url = sys.argv[3]
34+
input_file = sys.argv[4]
3235

33-
service_name=os.getenv('SERVICE_NAME')
34-
35-
connect(admin_username,admin_password,"t3://" + service_name + ":" + admin_port)
36+
connect(admin_username,admin_password,url)
3637

3738
errors=[]
3839
def addError(err):
@@ -48,8 +49,9 @@ def addError(err):
4849
if len(line)>0 and line[0]=='#':
4950
continue
5051
words=line.split(',')
51-
if (len(words) == 1 and line != '') or len(words) != 4:
52-
addError("Error in line syntax line#=" + str(line_no) + " line='"+line+"'")
52+
if len(words) != 4:
53+
if line != '':
54+
addError("Error in line syntax line#=" + str(line_no) + " line='"+line+"'")
5355
continue
5456
bean_path=words[0]
5557
attr=words[1]
@@ -95,3 +97,5 @@ def addError(err):
9597
for err in errors:
9698
print " --> " + err
9799
exit(exitcode=1)
100+
101+
print "Test Passed!"

src/integration-tests/introspector/introspectTest.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,17 @@ deploySinglePodService ${MANAGED_SERVER_NAME_BASE?}1 ${MANAGED_SERVER_PORT?} 308
581581
# TBD 1 weblogic/welcome1 should be deduced via a base64 of the admin secret
582582
# TBD 2 generate checkBeans.input instead of using a hard coded file, add more beans to check, and check mgd servers too
583583

584-
kubectl cp checkBeans.input domain1-admin-server:/shared/checkBeans.input
585-
kubectl cp checkBeans.py domain1-admin-server:/shared/checkBeans.py
586-
kubectl exec -it domain1-admin-server wlst.sh /shared/checkBeans.py weblogic welcome1 /shared/checkBeans.input
584+
trace "Info: Checking beans to see if sit-cfg took effect. Input file 'checkBeans.input', output file '$test_home/checkBeans.out'."
585+
kubectl cp checkBeans.input domain1-admin-server:/shared/checkBeans.input || exit 1
586+
kubectl cp checkBeans.py domain1-admin-server:/shared/checkBeans.py || exit 1
587+
kubectl exec -it domain1-admin-server \
588+
wlst.sh /shared/checkBeans.py \
589+
weblogic welcome1 t3://domain1-admin-server:7001 \
590+
/shared/checkBeans.input \
591+
> $test_home/checkBeans.out 2>&1
592+
if [ $? -ne 0 ]; then
593+
trace "Error: checkBeans failed, see '$test_home/checkBeans.out'."
594+
exit 1
595+
fi
587596

588597
trace "Info: success!"

0 commit comments

Comments
 (0)