Skip to content

Commit

Permalink
Initial test that does nothing
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <[email protected]>
  • Loading branch information
mulkieran committed Sep 13, 2024
1 parent 30f7be4 commit e3b3df9
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
pylint
python3-dbus-client-gen
python3-dbus-python-client-gen
python3-hypothesis
python3-justbytes
python3-psutil
python3-pyudev
Expand Down
4 changes: 4 additions & 0 deletions tests/client-dbus/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ filesystem-predict-tests:
.PHONY: dump-metadata-tests
dump-metadata-tests:
python3 -m unittest ${UNITTEST_OPTS} tests.udev.test_dump

.PHONY: model-tests
model-tests:
python3 -m unittest ${UNITTEST_OPTS} tests.model.test_hypothesis_stateful
Empty file.
44 changes: 44 additions & 0 deletions tests/client-dbus/tests/model/test_hypothesis_stateful.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright 2024 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.
"""
Use hypothesis stateful testing to test stratisd.
"""

# isort: STDLIB

# isort: THIRDPARTY
from hypothesis.stateful import RuleBasedStateMachine, precondition, rule


class StratisOrders(RuleBasedStateMachine):
"""
Rule based machine for doing testing.
"""

@precondition(lambda self: True)
@rule()
def create_pool(self):
"""
Create a pool.
"""

@precondition(lambda self: True)
@rule()
def destroy_pool(self):
"""
Destroy a pool.
"""


TestStratis = StratisOrders.TestCase

0 comments on commit e3b3df9

Please sign in to comment.