@@ -35,37 +35,8 @@ def strategic_connector_file():
35
35
36
36
37
37
@pytest .fixture
38
- def not_strategic_backward_compatibility_change_expected_team (tmp_path , pokeapi_acceptance_test_config_path ) -> List :
39
- expected_teams = list (required_reviewer_checks .BACKWARD_COMPATIBILITY_REVIEWERS )
40
- backup_path = tmp_path / "backup_poke_acceptance"
41
- shutil .copyfile (pokeapi_acceptance_test_config_path , backup_path )
42
- with open (pokeapi_acceptance_test_config_path , "a" ) as acceptance_test_config_file :
43
- acceptance_test_config_file .write ("disable_for_version: 0.0.0" )
44
- yield expected_teams
45
- shutil .copyfile (backup_path , pokeapi_acceptance_test_config_path )
46
-
47
-
48
- @pytest .fixture
49
- def not_strategic_test_strictness_level_change_expected_team (tmp_path , pokeapi_acceptance_test_config_path ) -> List :
50
- expected_teams = list (required_reviewer_checks .TEST_STRICTNESS_LEVEL_REVIEWERS )
51
- backup_path = tmp_path / "non_strategic_acceptance_test_config.backup"
52
- shutil .copyfile (pokeapi_acceptance_test_config_path , backup_path )
53
- with open (pokeapi_acceptance_test_config_path , "a" ) as acceptance_test_config_file :
54
- acceptance_test_config_file .write ("test_strictness_level: foo" )
55
- yield expected_teams
56
- shutil .copyfile (backup_path , pokeapi_acceptance_test_config_path )
57
-
58
-
59
- @pytest .fixture
60
- def not_strategic_bypass_reason_file_change_expected_team (tmp_path , pokeapi_acceptance_test_config_path ):
61
- # The bypass reason logic explicitly only checks for bypass reasons on strategic connectors
62
- expected_teams = []
63
- backup_path = tmp_path / "non_strategic_acceptance_test_config.backup"
64
- shutil .copyfile (pokeapi_acceptance_test_config_path , backup_path )
65
- with open (pokeapi_acceptance_test_config_path , "a" ) as acceptance_test_config_file :
66
- acceptance_test_config_file .write ("bypass_reason:" )
67
- yield expected_teams
68
- shutil .copyfile (backup_path , pokeapi_acceptance_test_config_path )
38
+ def strategic_connector_metadata_path ():
39
+ return "airbyte-integrations/connectors/source-amplitude/metadata.yaml"
69
40
70
41
71
42
@pytest .fixture
@@ -90,45 +61,6 @@ def strategic_connector_file_change_expected_team(tmp_path, strategic_connector_
90
61
shutil .copyfile (backup_path , strategic_connector_file )
91
62
92
63
93
- @pytest .fixture
94
- def strategic_connector_backward_compatibility_file_change_expected_team (tmp_path , strategic_connector_file ):
95
- expected_teams = list (
96
- required_reviewer_checks .STRATEGIC_PYTHON_CONNECTOR_REVIEWERS .union (required_reviewer_checks .BACKWARD_COMPATIBILITY_REVIEWERS )
97
- )
98
- backup_path = tmp_path / "strategic_acceptance_test_config.backup"
99
- shutil .copyfile (strategic_connector_file , backup_path )
100
- with open (strategic_connector_file , "a" ) as strategic_acceptance_test_config_file :
101
- strategic_acceptance_test_config_file .write ("disable_for_version: 0.0.0" )
102
- yield expected_teams
103
- shutil .copyfile (backup_path , strategic_connector_file )
104
-
105
-
106
- @pytest .fixture
107
- def strategic_connector_bypass_reason_file_change_expected_team (tmp_path , strategic_connector_file ):
108
- expected_teams = list (
109
- required_reviewer_checks .STRATEGIC_PYTHON_CONNECTOR_REVIEWERS .union (required_reviewer_checks .BYPASS_REASON_REVIEWERS )
110
- )
111
- backup_path = tmp_path / "strategic_acceptance_test_config.backup"
112
- shutil .copyfile (strategic_connector_file , backup_path )
113
- with open (strategic_connector_file , "a" ) as strategic_acceptance_test_config_file :
114
- strategic_acceptance_test_config_file .write ("bypass_reason:" )
115
- yield expected_teams
116
- shutil .copyfile (backup_path , strategic_connector_file )
117
-
118
-
119
- @pytest .fixture
120
- def strategic_connector_test_strictness_level_file_change_expected_team (tmp_path , strategic_connector_file ):
121
- expected_teams = list (
122
- required_reviewer_checks .STRATEGIC_PYTHON_CONNECTOR_REVIEWERS .union (required_reviewer_checks .TEST_STRICTNESS_LEVEL_REVIEWERS )
123
- )
124
- backup_path = tmp_path / "strategic_acceptance_test_config.backup"
125
- shutil .copyfile (strategic_connector_file , backup_path )
126
- with open (strategic_connector_file , "a" ) as strategic_acceptance_test_config_file :
127
- strategic_acceptance_test_config_file .write ("test_strictness_level: 0.0.0" )
128
- yield expected_teams
129
- shutil .copyfile (backup_path , strategic_connector_file )
130
-
131
-
132
64
@pytest .fixture
133
65
def test_breaking_change_release_expected_team (tmp_path , pokeapi_metadata_path ) -> List :
134
66
expected_teams = list (required_reviewer_checks .BREAKING_CHANGE_REVIEWERS )
@@ -142,6 +74,21 @@ def test_breaking_change_release_expected_team(tmp_path, pokeapi_metadata_path)
142
74
shutil .copyfile (backup_path , pokeapi_metadata_path )
143
75
144
76
77
+ @pytest .fixture
78
+ def strategic_connector_breaking_change_release_expected_teams (tmp_path , strategic_connector_metadata_path ):
79
+ expected_teams = list (
80
+ required_reviewer_checks .STRATEGIC_PYTHON_CONNECTOR_REVIEWERS .union (required_reviewer_checks .BREAKING_CHANGE_REVIEWERS )
81
+ )
82
+ backup_path = tmp_path / "strategic_acceptance_test_config.backup"
83
+ shutil .copyfile (strategic_connector_metadata_path , backup_path )
84
+ with open (strategic_connector_metadata_path , "a" ) as strategic_connector_metadata_file :
85
+ strategic_connector_metadata_file .write (
86
+ "releases:\n breakingChanges:\n 23.0.0:\n message: hi\n upgradeDeadline: 2025-01-01"
87
+ )
88
+ yield expected_teams
89
+ shutil .copyfile (backup_path , strategic_connector_metadata_path )
90
+
91
+
145
92
def verify_no_requirements_file_was_generated (captured : str ):
146
93
assert captured .out .split ("\n " )[0 ].split ("=" )[- 1 ] == "false"
147
94
@@ -168,41 +115,19 @@ def check_review_requirements_file(capsys, expected_teams: List):
168
115
verify_review_requirements_file_contains_expected_teams (requirements_file_path , expected_teams )
169
116
170
117
171
- def test_find_mandatory_reviewers_backward_compatibility (capsys , not_strategic_backward_compatibility_change_expected_team ):
172
- check_review_requirements_file (capsys , not_strategic_backward_compatibility_change_expected_team )
173
-
174
-
175
- def test_find_mandatory_reviewers_test_strictness_level (capsys , not_strategic_test_strictness_level_change_expected_team ):
176
- check_review_requirements_file (capsys , not_strategic_test_strictness_level_change_expected_team )
177
-
178
-
179
- def test_find_mandatory_reviewers_not_strategic_bypass_reason (capsys , not_strategic_bypass_reason_file_change_expected_team ):
180
- check_review_requirements_file (capsys , not_strategic_bypass_reason_file_change_expected_team )
181
-
182
-
183
118
def test_find_mandatory_reviewers_ga (capsys , strategic_connector_file_change_expected_team ):
184
119
check_review_requirements_file (capsys , strategic_connector_file_change_expected_team )
185
120
186
121
187
- def test_find_mandatory_reviewers_strategic_backward_compatibility (
188
- capsys , strategic_connector_backward_compatibility_file_change_expected_team
189
- ):
190
- check_review_requirements_file (capsys , strategic_connector_backward_compatibility_file_change_expected_team )
191
-
192
-
193
- def test_find_mandatory_reviewers_strategic_bypass_reason (capsys , strategic_connector_bypass_reason_file_change_expected_team ):
194
- check_review_requirements_file (capsys , strategic_connector_bypass_reason_file_change_expected_team )
195
-
196
-
197
- def test_find_mandatory_reviewers_strategic_test_strictness_level (
198
- capsys , strategic_connector_test_strictness_level_file_change_expected_team
199
- ):
200
- check_review_requirements_file (capsys , strategic_connector_test_strictness_level_file_change_expected_team )
201
-
202
-
203
122
def test_find_mandatory_reviewers_breaking_change_release (capsys , test_breaking_change_release_expected_team ):
204
123
check_review_requirements_file (capsys , test_breaking_change_release_expected_team )
205
124
206
125
207
126
def test_find_mandatory_reviewers_no_tracked_changed (capsys , not_strategic_not_tracked_change_expected_team ):
208
127
check_review_requirements_file (capsys , not_strategic_not_tracked_change_expected_team )
128
+
129
+
130
+ def test_find_mandatory_reviewers_strategic_connector_breaking_change_release (
131
+ capsys , strategic_connector_breaking_change_release_expected_teams
132
+ ):
133
+ check_review_requirements_file (capsys , strategic_connector_breaking_change_release_expected_teams )
0 commit comments