tests: Test install of unconcretized spec (#12099)
This commit is contained in:
parent
8bb745325d
commit
7411347a29
1 changed files with 17 additions and 0 deletions
|
@ -383,3 +383,20 @@ def test_pkg_install_log(install_mockery):
|
|||
|
||||
# Cleanup
|
||||
shutil.rmtree(log_dir)
|
||||
|
||||
|
||||
def test_unconcretized_install(install_mockery, mock_fetch, mock_packages):
|
||||
"""Test attempts to perform install phases with unconcretized spec."""
|
||||
spec = Spec('trivial-install-test-package')
|
||||
|
||||
with pytest.raises(ValueError, match="only install concrete packages"):
|
||||
spec.package.do_install()
|
||||
|
||||
with pytest.raises(ValueError, match="fetch concrete packages"):
|
||||
spec.package.do_fetch()
|
||||
|
||||
with pytest.raises(ValueError, match="stage concrete packages"):
|
||||
spec.package.do_stage()
|
||||
|
||||
with pytest.raises(ValueError, match="patch concrete packages"):
|
||||
spec.package.do_patch()
|
||||
|
|
Loading…
Reference in a new issue