Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <[email protected]>
  • Loading branch information
mulkieran committed May 10, 2022
1 parent 530754b commit 6f5df2b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/stratis_cli/_actions/_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def refresh_state(_namespace):
(return_code, message) = Manager.Methods.RefreshState(
get_object(TOP_OBJECT), {}
)
if return_code != StratisdErrors.OK:
if return_code != StratisdErrors.OK: # pragma: no cover
raise StratisCliEngineError(return_code, message)


Expand Down
32 changes: 32 additions & 0 deletions tests/whitebox/integration/test_debug.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright 2022 Red Hat, Inc.
#
# 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.
"""
Test 'stratis debug'.
"""

from ._misc import TEST_RUNNER, SimTestCase


class DebugTestCase(SimTestCase):
"""
Test debug commands.
"""

_MENU = ["--propagate", "debug", "refresh"]

def test_refresh(self):
"""
Test calling refresh.
"""
TEST_RUNNER(self._MENU)

0 comments on commit 6f5df2b

Please sign in to comment.