Skip to content

Commit d8be6a7

Browse files
authored
Merge pull request #138 from oracle/issue#137-unit-test-fails-with-older-wlst
Issue #137 - Use explicit WLS version in unit test
2 parents 1e3e3b9 + aee937b commit d8be6a7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

core/src/test/python/aliases_test.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ class AliasesTestCase(unittest.TestCase):
3131
1) Unit tests must be a class that extends unittest.TestCase
3232
2) Class methods with names starting with 'test' will be executed by the framework (all others skipped)
3333
"""
34+
wls_version = '12.2.1.3'
3435

3536
arg_map = {
36-
CommandLineArgUtil.ORACLE_HOME_SWITCH: os.environ.get('ORACLE_HOME'),
37+
CommandLineArgUtil.ORACLE_HOME_SWITCH: '/oracleHome',
3738
CommandLineArgUtil.DOMAIN_HOME_SWITCH: ''
3839
}
3940

4041
logger = platform_logger.PlatformLogger('wlsdeploy.unittest')
41-
wlst_version = WebLogicHelper(logger).wl_version_actual
42-
model_context = ModelContext(sys.argv[0], arg_map)
42+
model_context = ModelContext("test", arg_map)
4343

4444
# create a set of aliases for use with WLST
45-
aliases = Aliases(model_context=model_context)
46-
online_aliases = Aliases(model_context=model_context, wlst_mode=WlstModes.ONLINE)
45+
aliases = Aliases(model_context=model_context, wlst_mode=WlstModes.OFFLINE, wls_version=wls_version)
46+
online_aliases = Aliases(model_context=model_context, wlst_mode=WlstModes.ONLINE, wls_version=wls_version)
4747

4848
def testDomainLevelAttributeAccessibility(self):
4949
location = LocationContext()
@@ -1292,4 +1292,4 @@ def testListGetToList(self):
12921292
self.assertEqual(wlst_list, actual_value)
12931293

12941294
if __name__ == '__main__':
1295-
unittest.main()
1295+
unittest.main()

0 commit comments

Comments
 (0)