Add framework for watcher-status upgrade check
This commit adds the functionality of watcher-status CLI for performing upgrade checks as part of the Stein cycle upgrade-checkers goal. It only includes a sample check which must be replaced by real checks in future. Change-Id: Ic3d066af439797d6f705e805334f729b52ce3aac Story: 2003657 Task: 26164
This commit is contained in:
30
watcher/tests/cmd/test_status.py
Normal file
30
watcher/tests/cmd/test_status.py
Normal file
@@ -0,0 +1,30 @@
|
||||
# Copyright (c) 2018 NEC, Corp.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_upgradecheck.upgradecheck import Code
|
||||
|
||||
from watcher.cmd import status
|
||||
from watcher.tests import base
|
||||
|
||||
|
||||
class TestUpgradeChecks(base.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(TestUpgradeChecks, self).setUp()
|
||||
self.cmd = status.Checks()
|
||||
|
||||
def test__sample_check(self):
|
||||
check_result = self.cmd._sample_check()
|
||||
self.assertEqual(
|
||||
Code.SUCCESS, check_result.code)
|
||||
Reference in New Issue
Block a user