File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ import pytest
2+
3+ from gardenlinux .features import CName
4+
5+
6+ @pytest .mark .parametrize (
7+ "input_cname, expected_output" ,
8+ [
9+ (
10+ "aws-gardener_prod" ,
11+ "aws-gardener_prod" ,
12+ ),
13+ (
14+ "metal-khost_dev" ,
15+ "metal-khost_dev" ,
16+ ),
17+ (
18+ "metal_pxe" ,
19+ "metal_pxe" ,
20+ ),
21+ ],
22+ )
23+ def test_cname_flavor (input_cname : str , expected_output : dict ):
24+ """
25+ Tests if cname returns the dict with expected features.
26+
27+ If you discover that this test failed, you may want to verify if the included
28+ features have changed since writing this test. In this case, update the expected output accordingly.
29+ You can print the output of cname so you have the dict in the expected format.
30+ """
31+ cname = CName (input_cname )
32+ assert cname .flavor == expected_output
You can’t perform that action at this time.
0 commit comments