Skip to content

Commit 98bb9a7

Browse files
committed
Changed code that reports it as a validation error to not have a properties file entry for model values containing a '$[' sequence
1 parent 39945f3 commit 98bb9a7

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

core/src/main/resources/oracle/weblogic/deploy/messages/wlsdeploy_rb.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,13 @@ WLSDPLY-05029={0} is not one of the attribute names allowed in model location {1
340340
WLSDPLY-05030=Model location {0} uses variable {1} to represent the name of a model subfolder or attribute. \
341341
Substitution variables can only be used for folder instance names and attribute values.
342342
WLSDPLY-05031=Attribute {0} in model location {1} references a relative file location {2}. This makes the model \
343-
subject to failure unless the tool in voked from the correct location to resolve the relative path to the file. \
343+
subject to failure unless the tool invoked from the correct location to resolve the relative path to the file. \
344344
It is recommended to use a path token if the absolute path is expected to change between systems.
345345
WLSDPLY-05032=Attribute {0} in model location {1} should be a dictionary but was a {2}
346346
WLSDPLY-05033=Attribute {0} in model location {1} should be a string but was a {2}
347347
WLSDPLY-05034=The value for attribute {0} in model location {1} should be a string or a list but was a {2}
348+
WLSDPLY-05035=The {0} attribute with value {1} in model location {2}, should be a string but was a {3}
349+
WLSDPLY-05036=Attribute {0} in model location {1}, uses the {2} macro expression for an integer or references to other another server template configuration element. The Oracle documentation for server templates, cites this as being not supported.
348350

349351

350352
# wlsdeploy/tools/validate/usage_printer.py

core/src/test/python/validation_test.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ class ValidationTestCase(unittest.TestCase):
2323
_class_name = 'ValidationTestCase'
2424
_resources_dir = '../../test-classes'
2525
_model_file = _resources_dir + '/test_jms_mail.json'
26-
_variable_file = _resources_dir + "/test_sub_variable_file.properties"
26+
_variable_file = None
27+
_archive_file = None
28+
# _variable_file = _resources_dir + "/test_sub_variable_file.properties"
2729
# _model_file = _resources_dir + '/test_empty.json'
2830
# _variable_file = _resources_dir + "/test_invalid_variable_file.properties"
29-
# _variable_file = None
30-
_archive_file = _resources_dir + "/test_jms_archive.zip"
31+
# _archive_file = _resources_dir + "/test_jms_archive.zip"
3132
_logger = PlatformLogger('wlsdeploy.validate')
3233

3334
def setUp(self):
@@ -41,11 +42,15 @@ def testModelValidation(self):
4142
mw_home = os.environ['MW_HOME']
4243
args_map = {
4344
'-oracle_home': mw_home,
44-
'-model_file': self._model_file,
45-
'-variable_file': self._variable_file,
46-
'-archive_file': self._archive_file
45+
'-model_file': self._model_file
4746
}
4847

48+
if self._variable_file is not None:
49+
args_map['-variable_file'] = self._variable_file
50+
51+
if self._variable_file is not None:
52+
args_map['-archive_file'] = self._archive_file
53+
4954
model_context = ModelContext('ValidationTestCase', args_map)
5055

5156
try:

0 commit comments

Comments
 (0)