Skip to content

Commit 910bc90

Browse files
Fix validation test to run on windows and linux (#896)
1 parent 73bb8d2 commit 910bc90

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/src/main/python/wlsdeploy/util/cla_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def persist_model(model_context, model_dictionary):
403403
if check_persist_model():
404404
store_value = os.environ.get(_store_environment_variable)
405405

406-
if store_value.startswith('/') or store_value.startswith('\\'):
406+
if os.path.isabs(store_value):
407407
file_path = store_value
408408
elif model_context.get_domain_home() is not None:
409409
file_path = model_context.get_domain_home() + os.sep + 'wlsdeploy' + os.sep + 'domain_model.json'

core/src/test/python/validation_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
class ValidationTestCase(unittest.TestCase):
3030
_program_name = 'validation_test'
3131
_class_name = 'ValidationTestCase'
32-
_resources_dir = '../../test-classes'
32+
_resources_dir = '..' + os.sep + '..' + os.sep + 'test-classes'
3333
# Model persistence file
34-
_wlsdeply_store_model = os.path.abspath(os.getcwd()) + '/' + _resources_dir + '/validate-mii-model.json'
34+
_wlsdeply_store_model = os.path.abspath(os.getcwd()) + os.sep + _resources_dir + os.sep + 'validate-mii-model.json'
3535
# _variable_file = _resources_dir + "/test_sub_variable_file.properties"
3636
# _model_file = _resources_dir + '/test_empty.json'
3737
# _variable_file = _resources_dir + "/test_invalid_variable_file.properties"

0 commit comments

Comments
 (0)