|
6 | 6 | import pytest
|
7 | 7 |
|
8 | 8 | from pipeline import (
|
9 |
| - calculate_images_to_build, |
| 9 | + get_included_images, |
10 | 10 | gather_all_supported_agent_versions,
|
11 | 11 | gather_latest_agent_versions,
|
12 | 12 | get_versions_to_rebuild,
|
@@ -64,43 +64,6 @@ def test_operator_build_configuration_defaults():
|
64 | 64 | assert config.namespace == "default"
|
65 | 65 |
|
66 | 66 |
|
67 |
| -@pytest.mark.parametrize( |
68 |
| - "test_case", |
69 |
| - [ |
70 |
| - (["a", "b", "c"], ["a"], ["b"], {"a", "c"}), |
71 |
| - (["a", "b", "c"], ["a", "b"], None, {"a", "b"}), |
72 |
| - (["a", "b", "c"], None, ["a"], {"b", "c"}), |
73 |
| - (["a", "b", "c"], [], [], {"a", "b", "c"}), |
74 |
| - (["a", "b", "c"], ["d"], None, ValueError), |
75 |
| - (["a", "b", "c"], None, ["d"], ValueError), |
76 |
| - ([], ["a"], ["b"], ValueError), |
77 |
| - (["a", "b", "c"], None, None, {"a", "b", "c"}), |
78 |
| -
|
79 |
| - # Given an include, it should only return include images |
80 |
| - (["cli", "ops-manager", "appdb-daily", "init-appdb"], ["cli"], [], {"cli"}), |
81 |
| -
|
82 |
| - # Given no include nor excludes it should return all images |
83 |
| - (["cli", "ops-manager", "appdb-daily", "init-appdb"], [], [], {'init-appdb', 'appdb-daily', 'ops-manager', 'cli'}), |
84 |
| -
|
85 |
| - # Given an exclude, it should return all images except the excluded ones |
86 |
| - (["cli", "ops-manager", "appdb-daily", "init-appdb"], [], ['init-appdb', 'appdb-daily'], {'ops-manager', 'cli'}), |
87 |
| -
|
88 |
| - # Given an include and a different exclude, it should return all images except the exclusions |
89 |
| - (["cli", "ops-manager", "appdb-daily", "init-appdb"], ['appdb-daily'], ['init-appdb'], {'appdb-daily', 'cli', 'ops-manager'}), |
90 |
| -
|
91 |
| - # Given multiple includes and a different exclude, it should return all images except the exclusions |
92 |
| - (["cli", "ops-manager", "appdb-daily", "init-appdb"], ['cli', 'appdb-daily'], ['init-appdb'], {'appdb-daily', 'cli', 'ops-manager'}), |
93 |
| - ], |
94 |
| -) |
95 |
| -def test_calculate_images_to_build(test_case): |
96 |
| - images, include, exclude, expected = test_case |
97 |
| - if expected is ValueError: |
98 |
| - with pytest.raises(ValueError): |
99 |
| - calculate_images_to_build(images, include, exclude) |
100 |
| - else: |
101 |
| - assert calculate_images_to_build(images, include, exclude) == expected |
102 |
| - |
103 |
| - |
104 | 67 | @pytest.mark.parametrize(
|
105 | 68 | "version,min_version,max_version,expected",
|
106 | 69 | [
|
|
0 commit comments