Skip to content

Commit

Permalink
sq: add test, change error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszachy committed May 3, 2024
1 parent ba3d063 commit 5aa8a37
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
8 changes: 8 additions & 0 deletions tests/discover/libraries/data/certificate.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ test: ./certificate.sh
require:
- url: https://github.com/psss/try
type: library
/node-metadata:
summary: Path exists but node of such name not
require:
- url: https://github.com/teemtee/tests
type: library
ref: missing-node-data
name: /dir-without-fmf
path: /nested
/reference:
summary: Requested reference does not exist
require:
Expand Down
Empty file.
5 changes: 5 additions & 0 deletions tests/discover/libraries/data/plan.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ execute:
summary: "Missing reference"
discover+:
test: missing/reference
/node-metadata:
summary: "Missing node with such name, but path exists"
discover+:
test: missing/node-metadata


/querying:
summary: "Many tests requiring same rpm-only library"
Expand Down
4 changes: 2 additions & 2 deletions tmt/libraries/beakerlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ def fetch(self) -> None:
f'url: {self.url}' if self.url else None,
f'ref: {self.ref}' if self.ref else None,
f'path: {self.path}' if self.path else None] if s is not None])
raise tmt.utils.SpecificationError(f"Can't find library @ {fmf_id}.") \
from error
raise tmt.utils.SpecificationError(
f"Library with {fmf_id=} doesn't exist.") from error

# Copy fmf metadata
shutil.copytree(clone_dir / '.fmf', directory / '.fmf', dirs_exist_ok=True)
Expand Down

0 comments on commit 5aa8a37

Please sign in to comment.