Skip to content

Commit 75cf122

Browse files
Aliastest set method removal (#1224)
* Fix for flattened folders without tokens in location * add wst mode to verify context * add wst mode to verify context
1 parent a33c43e commit 75cf122

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

integration-tests/alias-test/verify/src/test/python/aliastest/verify/verifier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ def _is_valid_type(self, location, generated_attribute, generated_attr_type, gen
910910
valid = True
911911
elif alias_type == alias_constants.STRING and _is_object_type(generated_attribute_info):
912912
valid = True
913-
if model_name not in set_method_list:
913+
if self._model_context.is_wlst_online() and model_name not in set_method_list:
914914
_logger.fine('Attribute {0} is an object but is not in the set method list {1}',
915915
generated_attribute, set_method_list, class_name=CLASS_NAME, method_name=_method_name)
916916
self._add_error(location, ERROR_ATTRIBUTE_SET_METHOD_MISSING, attribute=generated_attribute)

integration-tests/alias-test/verify/src/test/python/aliastest/verify/verify_context.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"""
55
from aliastest.verify import constants
66

7+
from wlsdeploy.aliases.wlst_modes import WlstModes
8+
79

810
class VerifyModelContext(object):
911
def __init__(self, program_name, wlst_mode, arg_map):
@@ -42,6 +44,20 @@ def get_target_wlst_mode(self):
4244
"""
4345
return self._wlst_mode
4446

47+
def is_wlst_online(self):
48+
"""
49+
Determine if the tool was started using WLST online mode
50+
:return: True if the tool is in online mode
51+
"""
52+
return self._wlst_mode == WlstModes.ONLINE
53+
54+
def is_wlst_offline(self):
55+
"""
56+
Determine if the tool was started using WLST offline mode
57+
:return: True if the tool is in offline mode
58+
"""
59+
return self._wlst_mode == WlstModes.OFFLINE
60+
4561
def get_generated_dir(self):
4662
return self._generated_dir
4763

0 commit comments

Comments
 (0)