Skip to content

Commit 4c98a05

Browse files
committed
Fixed LogMonitoringEnabled attribute in Log and ServerTemplate alias JSON files
1 parent 1401bc9 commit 4c98a05

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

core/src/test/python/aliases_test.py

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,75 @@ def testIssue38Fix(self):
11141114

11151115
return
11161116

1117+
def testIssue39Fix(self):
1118+
location = LocationContext().append_location(FOLDERS.PARTITION)
1119+
token = self.aliases.get_name_token(location)
1120+
location.add_name_token(token, 'Partition-0')
1121+
1122+
# Check offline value of wlst_mbean_type of FOLDERS.PARTITION
1123+
wlst_mbean_type = self.aliases.get_wlst_mbean_type(location)
1124+
expected = FOLDERS.PARTITION
1125+
self.assertEqual(wlst_mbean_type, expected)
1126+
1127+
# Check online value of wlst_mbean_type of FOLDERS.PARTITION.
1128+
# There should be an 's' on the end of FOLDERS.PARTITION
1129+
wlst_mbean_type = self.online_aliases.get_wlst_mbean_type(location)
1130+
expected = '%ss' % FOLDERS.PARTITION
1131+
self.assertEqual(wlst_mbean_type, expected)
1132+
1133+
# Add FOLDERS.RESOURCE_MANAGER to the location
1134+
location.append_location(FOLDERS.RESOURCE_MANAGER)
1135+
token = self.aliases.get_name_token(location)
1136+
location.add_name_token(token, 'ResourceManager-0')
1137+
1138+
# Check offline value of wlst_mbean_type after adding
1139+
# FOLDERS.RESOURCE_MANAGER to the location. There
1140+
# should not be an 's' on the end of FOLDERS.RESOURCE_MANAGER
1141+
wlst_mbean_type = self.aliases.get_wlst_mbean_type(location)
1142+
expected = FOLDERS.RESOURCE_MANAGER
1143+
self.assertEqual(wlst_mbean_type, expected)
1144+
1145+
# Check online value of wlst_mbean_type after adding
1146+
# FOLDERS.RESOURCE_MANAGER to the location. It
1147+
# should be the same value as offline; no 's' on the
1148+
# end of FOLDERS.RESOURCE_MANAGER
1149+
wlst_mbean_type = self.online_aliases.get_wlst_mbean_type(location)
1150+
self.assertEqual(wlst_mbean_type, expected)
1151+
1152+
# Check offline value of wlst_list_path after adding
1153+
# FOLDERS.RESOURCE_MANAGER to the location. There
1154+
# should not be an 's' on the end of FOLDERS.PARTITION or
1155+
# FOLDERS.RESOURCE_MANAGER
1156+
expected = [FOLDERS.PARTITION, 'Partition-0', FOLDERS.RESOURCE_MANAGER]
1157+
wlst_list_path = self.aliases.get_wlst_list_path(location)
1158+
self.assertEqual(wlst_list_path, '/%s' % '/'.join(expected))
1159+
1160+
# Check online value of wlst_list_path after adding
1161+
# FOLDERS.RESOURCE_MANAGER to the location. There
1162+
# should be an 's' on the end of FOLDERS.PARTITION, but
1163+
# not on the end of FOLDERS.RESOURCE_MANAGER
1164+
expected = ['%ss' % FOLDERS.PARTITION, 'Partition-0', FOLDERS.RESOURCE_MANAGER]
1165+
wlst_list_path = self.online_aliases.get_wlst_list_path(location)
1166+
self.assertEqual(wlst_list_path, '/%s' % '/'.join(expected))
1167+
1168+
# Check offline value of wlst_subfolders_path after adding
1169+
# FOLDERS.RESOURCE_MANAGER to the location. There
1170+
# should be an 's' on the end of FOLDERS.PARTITION, but
1171+
# not on the end of FOLDERS.RESOURCE_MANAGER
1172+
expected = [FOLDERS.PARTITION, 'Partition-0', FOLDERS.RESOURCE_MANAGER, 'ResourceManager-0']
1173+
wlst_subfolders_path = self.aliases.get_wlst_subfolders_path(location)
1174+
self.assertEqual(wlst_subfolders_path, '/%s' % '/'.join(expected))
1175+
1176+
# Check online value of wlst_subfolders_path after adding
1177+
# FOLDERS.RESOURCE_MANAGER to the location. There
1178+
# should be an 's' on the end of FOLDERS.PARTITION, but
1179+
# not on the end of FOLDERS.RESOURCE_MANAGER
1180+
expected = ['%ss' % FOLDERS.PARTITION, 'Partition-0', FOLDERS.RESOURCE_MANAGER, 'ResourceManager-0']
1181+
wlst_subfolders_path = self.online_aliases.get_wlst_subfolders_path(location)
1182+
self.assertEqual(wlst_subfolders_path, '/%s' % '/'.join(expected))
1183+
1184+
return
1185+
11171186
def testIssue50Fix(self):
11181187
location = LocationContext().append_location(FOLDERS.SERVER_TEMPLATE)
11191188
token = self.aliases.get_name_token(location)

0 commit comments

Comments
 (0)