@@ -75,6 +75,36 @@ def test_operator_build_configuration_defaults():
75
75
(["a" , "b" , "c" ], None , ["d" ], ValueError ),
76
76
([], ["a" ], ["b" ], ValueError ),
77
77
(["a" , "b" , "c" ], None , None , {"a" , "b" , "c" }),
78
+ # Given an include, it should only return include images
79
+ (["cli" , "ops-manager" , "appdb-daily" , "init-appdb" ], ["cli" ], [], {"cli" }),
80
+ # Given no include nor excludes it should return all images
81
+ (
82
+ ["cli" , "ops-manager" , "appdb-daily" , "init-appdb" ],
83
+ [],
84
+ [],
85
+ {"init-appdb" , "appdb-daily" , "ops-manager" , "cli" },
86
+ ),
87
+ # Given an exclude, it should return all images except the excluded ones
88
+ (
89
+ ["cli" , "ops-manager" , "appdb-daily" , "init-appdb" ],
90
+ [],
91
+ ["init-appdb" , "appdb-daily" ],
92
+ {"ops-manager" , "cli" },
93
+ ),
94
+ # Given an include and a different exclude, it should return all images except the exclusions
95
+ (
96
+ ["cli" , "ops-manager" , "appdb-daily" , "init-appdb" ],
97
+ ["appdb-daily" ],
98
+ ["init-appdb" ],
99
+ {"appdb-daily" , "cli" , "ops-manager" },
100
+ ),
101
+ # Given multiple includes and a different exclude, it should return all images except the exclusions
102
+ (
103
+ ["cli" , "ops-manager" , "appdb-daily" , "init-appdb" ],
104
+ ["cli" , "appdb-daily" ],
105
+ ["init-appdb" ],
106
+ {"appdb-daily" , "cli" , "ops-manager" },
107
+ ),
78
108
],
79
109
)
80
110
def test_calculate_images_to_build (test_case ):
0 commit comments