Skip to content

Commit

Permalink
Add test cases for taking over library prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
simu committed Feb 7, 2023
1 parent f38c253 commit 6d31d0a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/test_dependency_mgmt_component_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,36 @@ def test_create_component_library_aliases_single_component(
{},
"Invalid alias prefix 'tc2' for template library alias of component 'tc1'",
),
# NOTE: we don't test the informational messages printed out when additional
# library prefixes are allowed or denied, we only test that there is an error
# message or not.
(
{
"library_aliases": {"tc2-fake.libsonnet": "tc1.libjsonnet"},
"replaces": "tc2",
},
{"deprecated": True, "replaced_by": "tc1"},
{},
None,
),
(
{
"library_aliases": {"tc2-fake.libsonnet": "tc1.libjsonnet"},
"replaces": "tc2",
},
{"deprecated": True, "replaced_by": "tc3"},
{},
"Invalid alias prefix 'tc2' for template library alias of component 'tc1'",
),
(
{
"library_aliases": {"tc2-fake.libsonnet": "tc1.libjsonnet"},
"replaces": "tc2",
},
{"deprecated": False, "replaced_by": "tc2"},
{},
"Invalid alias prefix 'tc2' for template library alias of component 'tc1'",
),
],
)
def test_create_component_library_aliases_multiple_component(
Expand Down

0 comments on commit 6d31d0a

Please sign in to comment.