Skip to content

Commit da41cf2

Browse files
Update examples and tests
1 parent 7fe3d9e commit da41cf2

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

example-answers.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
author_email: [email protected]
22
author_name: Tom Cobb
3-
component_owner: group:default/sscc
3+
component_owner: group:default/daq
4+
component_type: service
5+
component_lifecycle: experimental
46
description: An expanded https://github.com/DiamondLightSource/python-copier-template to illustrate how it looks with all the options enabled.
57
distribution_name: dls-python-copier-template-example
68
docker: true

tests/test_example.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,26 @@ def test_works_in_pyright_strict_mode(tmp_path: Path):
163163
# Ensure pyright is still happy
164164
run = make_venv(tmp_path)
165165
run(f"./venv/bin/pyright {tmp_path}")
166+
167+
168+
def test_catalog_info(tmp_path: Path):
169+
copy_project(tmp_path)
170+
catalog_info_path = tmp_path / "catalog-info.yaml"
171+
with catalog_info_path.open("r") as stream:
172+
catalog_info = yaml.safe_load(stream)
173+
assert catalog_info == {
174+
"apiVersion": "backstage.io/v1alpha1",
175+
"kind": "Component",
176+
"metadata": {
177+
"name": "dls-python-copier-template-example",
178+
"title": "python-copier-template-example",
179+
"description": "An expanded "
180+
"https://github.com/DiamondLightSource/python-copier-template "
181+
"to illustrate how it looks with all the options enabled.",
182+
},
183+
"spec": {
184+
"type": "service",
185+
"lifecycle": "experimental",
186+
"owner": "group:default/daq",
187+
},
188+
}

0 commit comments

Comments
 (0)