debian-forge/test/run/test_noop.py
David Rheinsberg a3d1e3ff50 test: import no-op test into the runtime-tests
Add a new trivial runtime-test which simply runs a no-op pipeline. This
is a fast, trivial test that simply verifies osbuild is properly setup
and accessible.

Remove the explicit no-op test from the CI, now that the test-suite has
it as well.
2020-06-05 09:27:40 +02:00

30 lines
767 B
Python

#
# Runtime Tests for No-op Pipelines
#
import unittest
from .. import test
class TestNoop(unittest.TestCase):
def setUp(self):
self.osbuild = test.OSBuild(self)
def test_noop(self):
#
# Run a noop Pipeline. Run twice to verify the cache does not affect
# the operation (we do not have checkpoints, nor any stages that could
# be checkpointed).
#
# Then run the entire thing again, to verify our own `osbuild` executor
# tears things down properly and allows to be executed multiple times.
#
with self.osbuild as osb:
osb.compile("{}")
osb.compile("{}")
with self.osbuild as osb:
osb.compile("{}")
osb.compile("{}")