test: use and require explicit exports
Require all the tests that compile a manifest to either specify checkpoints or exports. Convert all the tests that were relying on implicit exports with v1 manifests to use explicit exports.
This commit is contained in:
parent
22d1d46ec1
commit
7ae4a7e785
4 changed files with 22 additions and 12 deletions
|
|
@ -1,12 +1,14 @@
|
|||
#
|
||||
# Runtime Tests for No-op Pipelines
|
||||
#
|
||||
|
||||
import json
|
||||
import tempfile
|
||||
import pytest
|
||||
|
||||
from .. import test
|
||||
|
||||
|
||||
@pytest.fixture(name="jsondata", scope="module")
|
||||
def jsondata_fixture():
|
||||
return json.dumps({
|
||||
|
|
@ -33,6 +35,7 @@ def jsondata_fixture():
|
|||
]
|
||||
})
|
||||
|
||||
|
||||
@pytest.fixture(name="tmpdir", scope="module")
|
||||
def tmpdir_fixture():
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
|
|
@ -52,14 +55,18 @@ def osbuild_fixture():
|
|||
# Then run the entire thing again, to verify our own `osbuild` executor
|
||||
# tears things down properly and allows to be executed multiple times.
|
||||
#
|
||||
|
||||
|
||||
def test_noop(osb):
|
||||
osb.compile("{}")
|
||||
osb.compile("{}")
|
||||
osb.compile("{}", checkpoints=[])
|
||||
osb.compile("{}", checkpoints=[])
|
||||
|
||||
|
||||
def test_noop2(osb):
|
||||
osb.compile("{}")
|
||||
osb.compile("{}")
|
||||
osb.compile("{}", checkpoints=[])
|
||||
osb.compile("{}", checkpoints=[])
|
||||
|
||||
|
||||
@pytest.mark.skipif(not test.TestBase.can_bind_mount(), reason="root-only")
|
||||
def test_noop_v2(osb, tmpdir, jsondata):
|
||||
osb.compile(jsondata, output_dir=tmpdir)
|
||||
osb.compile(jsondata, output_dir=tmpdir, exports=["noop"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue