Set PLATFORM_RELEASE=19.09
Depends-On: I96392f293883d5583e51abfca8cac8e4c3d187a1 Depends-On: Ibe6121c430eccf84698be67d587ebc7ac7c40755 Change-Id: I9325f57a85bcea7274dfb7ab41898b5c48d294a3 Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
parent
adce620655
commit
b0b7700bd9
@ -11,14 +11,14 @@ import testtools
|
|||||||
|
|
||||||
class TsConfigTestCase(testtools.TestCase):
|
class TsConfigTestCase(testtools.TestCase):
|
||||||
|
|
||||||
mock_19_01_build = u"""
|
mock_19_09_build = u"""
|
||||||
###
|
###
|
||||||
### StarlingX
|
### StarlingX
|
||||||
### Release 19.01
|
### Release 19.09
|
||||||
###
|
###
|
||||||
|
|
||||||
OS="centos"
|
OS="centos"
|
||||||
SW_VERSION="19.01"
|
SW_VERSION="19.09"
|
||||||
BUILD_TARGET="Host Installer"
|
BUILD_TARGET="Host Installer"
|
||||||
BUILD_TYPE="Formal"
|
BUILD_TYPE="Formal"
|
||||||
BUILD_ID="f/stein"
|
BUILD_ID="f/stein"
|
||||||
@ -33,7 +33,7 @@ BUILD_DATE="2019-02-22 19:18:29 +0000"
|
|||||||
mock_malformed_build = u"""
|
mock_malformed_build = u"""
|
||||||
###
|
###
|
||||||
### StarlingX
|
### StarlingX
|
||||||
### Release 19.01
|
### Release 19.09
|
||||||
nodetype=
|
nodetype=
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ cluster_host_interface=enp0s4
|
|||||||
sdn_enabled=no
|
sdn_enabled=no
|
||||||
region_config=no
|
region_config=no
|
||||||
system_mode=duplex
|
system_mode=duplex
|
||||||
sw_version=19.01
|
sw_version=19.09
|
||||||
security_feature="nopti nospectre_v2"
|
security_feature="nopti nospectre_v2"
|
||||||
vswitch_type=ovs-dpdk
|
vswitch_type=ovs-dpdk
|
||||||
"""
|
"""
|
||||||
@ -81,7 +81,7 @@ region_1_name=Region1
|
|||||||
region_2_name=Region2
|
region_2_name=Region2
|
||||||
distributed_cloud_role=CloudRole
|
distributed_cloud_role=CloudRole
|
||||||
system_mode=duplex
|
system_mode=duplex
|
||||||
sw_version=19.01
|
sw_version=19.09
|
||||||
security_feature="nopti nospectre_v2"
|
security_feature="nopti nospectre_v2"
|
||||||
vswitch_type=ovs-dpdk
|
vswitch_type=ovs-dpdk
|
||||||
"""
|
"""
|
||||||
@ -128,7 +128,7 @@ vswitch_type=ovs-dpdk
|
|||||||
# two files are opened by tsconfig.
|
# two files are opened by tsconfig.
|
||||||
# 1st: /etc/build.info
|
# 1st: /etc/build.info
|
||||||
# 2nd: /etc/platform/platform.conf
|
# 2nd: /etc/platform/platform.conf
|
||||||
mock_open.return_value = io.StringIO(self.mock_19_01_build)
|
mock_open.return_value = io.StringIO(self.mock_19_09_build)
|
||||||
from tsconfig import tsconfig # pylint: disable=unused-variable
|
from tsconfig import tsconfig # pylint: disable=unused-variable
|
||||||
mock_logging_exception.assert_called_once()
|
mock_logging_exception.assert_called_once()
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ vswitch_type=ovs-dpdk
|
|||||||
# two files are opened by tsconfig.
|
# two files are opened by tsconfig.
|
||||||
# 1st: /etc/build.info
|
# 1st: /etc/build.info
|
||||||
# 2nd: /etc/platform/platform.conf
|
# 2nd: /etc/platform/platform.conf
|
||||||
mock_open.side_effect = [io.StringIO(self.mock_19_01_build),
|
mock_open.side_effect = [io.StringIO(self.mock_19_09_build),
|
||||||
io.StringIO(self.mock_platform_conf_empty)]
|
io.StringIO(self.mock_platform_conf_empty)]
|
||||||
from tsconfig import tsconfig # pylint: disable=unused-variable
|
from tsconfig import tsconfig # pylint: disable=unused-variable
|
||||||
mock_logging_exception.assert_called_once()
|
mock_logging_exception.assert_called_once()
|
||||||
@ -155,7 +155,7 @@ vswitch_type=ovs-dpdk
|
|||||||
# two files are opened by tsconfig.
|
# two files are opened by tsconfig.
|
||||||
# 1st: /etc/build.info
|
# 1st: /etc/build.info
|
||||||
# 2nd: /etc/platform/platform.conf
|
# 2nd: /etc/platform/platform.conf
|
||||||
mock_open.side_effect = [io.StringIO(self.mock_19_01_build),
|
mock_open.side_effect = [io.StringIO(self.mock_19_09_build),
|
||||||
io.StringIO(self.mock_platform_conf_minimal)]
|
io.StringIO(self.mock_platform_conf_minimal)]
|
||||||
from tsconfig import tsconfig
|
from tsconfig import tsconfig
|
||||||
val = tsconfig.nodetype
|
val = tsconfig.nodetype
|
||||||
@ -169,11 +169,11 @@ vswitch_type=ovs-dpdk
|
|||||||
# two files are opened by tsconfig.
|
# two files are opened by tsconfig.
|
||||||
# 1st: /etc/build.info
|
# 1st: /etc/build.info
|
||||||
# 2nd: /etc/platform/platform.conf
|
# 2nd: /etc/platform/platform.conf
|
||||||
mock_open.side_effect = [io.StringIO(self.mock_19_01_build),
|
mock_open.side_effect = [io.StringIO(self.mock_19_09_build),
|
||||||
io.StringIO(self.mock_platform_conf)]
|
io.StringIO(self.mock_platform_conf)]
|
||||||
from tsconfig import tsconfig
|
from tsconfig import tsconfig
|
||||||
ver = tsconfig.SW_VERSION
|
ver = tsconfig.SW_VERSION
|
||||||
self.assertEqual(ver, "19.01")
|
self.assertEqual(ver, "19.09")
|
||||||
|
|
||||||
@mock.patch('six.moves.builtins.open')
|
@mock.patch('six.moves.builtins.open')
|
||||||
@mock.patch('os.path.isfile', return_value=True)
|
@mock.patch('os.path.isfile', return_value=True)
|
||||||
@ -182,9 +182,9 @@ vswitch_type=ovs-dpdk
|
|||||||
# 1st: /etc/build.info
|
# 1st: /etc/build.info
|
||||||
# 2nd: /etc/platform/platform.conf
|
# 2nd: /etc/platform/platform.conf
|
||||||
# Next two files are loaded as part of reload
|
# Next two files are loaded as part of reload
|
||||||
mock_open.side_effect = [io.StringIO(self.mock_19_01_build),
|
mock_open.side_effect = [io.StringIO(self.mock_19_09_build),
|
||||||
io.StringIO(self.mock_platform_conf),
|
io.StringIO(self.mock_platform_conf),
|
||||||
io.StringIO(self.mock_19_01_build),
|
io.StringIO(self.mock_19_09_build),
|
||||||
io.StringIO(self.mock_platform_conf_regions)]
|
io.StringIO(self.mock_platform_conf_regions)]
|
||||||
from tsconfig import tsconfig
|
from tsconfig import tsconfig
|
||||||
# Initial platform.conf has no region names
|
# Initial platform.conf has no region names
|
||||||
|
Loading…
Reference in New Issue
Block a user