@@ -19,46 +19,20 @@ def mock_diffed_branched(mocker):
19
19
return airbyte_repo .active_branch
20
20
21
21
22
- @pytest .fixture
23
- def pokeapi_acceptance_test_config_path ():
24
- return "airbyte-integrations/connectors/source-pokeapi/acceptance-test-config.yml"
25
-
26
-
27
22
@pytest .fixture
28
23
def pokeapi_metadata_path ():
29
24
return "airbyte-integrations/connectors/source-pokeapi/metadata.yaml"
30
25
31
26
32
27
@pytest .fixture
33
- def strategic_connector_file ():
34
- return "airbyte-integrations/connectors/source-amplitude/acceptance-test-config.yml"
35
-
36
-
37
- @pytest .fixture
38
- def strategic_connector_metadata_path ():
39
- return "airbyte-integrations/connectors/source-amplitude/metadata.yaml"
40
-
41
-
42
- @pytest .fixture
43
- def not_strategic_not_tracked_change_expected_team (tmp_path , pokeapi_acceptance_test_config_path ):
28
+ def not_tracked_change_expected_team (tmp_path , pokeapi_metadata_path ):
44
29
expected_teams = []
45
30
backup_path = tmp_path / "non_strategic_acceptance_test_config.backup"
46
- shutil .copyfile (pokeapi_acceptance_test_config_path , backup_path )
47
- with open (pokeapi_acceptance_test_config_path , "a" ) as acceptance_test_config_file :
48
- acceptance_test_config_file .write ("not_tracked" )
49
- yield expected_teams
50
- shutil .copyfile (backup_path , pokeapi_acceptance_test_config_path )
51
-
52
-
53
- @pytest .fixture
54
- def strategic_connector_file_change_expected_team (tmp_path , strategic_connector_file ):
55
- expected_teams = list (required_reviewer_checks .STRATEGIC_PYTHON_CONNECTOR_REVIEWERS )
56
- backup_path = tmp_path / "strategic_acceptance_test_config.backup"
57
- shutil .copyfile (strategic_connector_file , backup_path )
58
- with open (strategic_connector_file , "a" ) as strategic_acceptance_test_config_file :
59
- strategic_acceptance_test_config_file .write ("foobar" )
31
+ shutil .copyfile (pokeapi_metadata_path , backup_path )
32
+ with open (pokeapi_metadata_path , "a" ) as metadata_file :
33
+ metadata_file .write ("not_tracked" )
60
34
yield expected_teams
61
- shutil .copyfile (backup_path , strategic_connector_file )
35
+ shutil .copyfile (backup_path , pokeapi_metadata_path )
62
36
63
37
64
38
@pytest .fixture
@@ -74,21 +48,6 @@ def test_breaking_change_release_expected_team(tmp_path, pokeapi_metadata_path)
74
48
shutil .copyfile (backup_path , pokeapi_metadata_path )
75
49
76
50
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
-
92
51
def verify_no_requirements_file_was_generated (captured : str ):
93
52
assert captured .out .split ("\n " )[0 ].split ("=" )[- 1 ] == "false"
94
53
@@ -115,19 +74,9 @@ def check_review_requirements_file(capsys, expected_teams: List):
115
74
verify_review_requirements_file_contains_expected_teams (requirements_file_path , expected_teams )
116
75
117
76
118
- def test_find_mandatory_reviewers_ga (capsys , strategic_connector_file_change_expected_team ):
119
- check_review_requirements_file (capsys , strategic_connector_file_change_expected_team )
120
-
121
-
122
77
def test_find_mandatory_reviewers_breaking_change_release (capsys , test_breaking_change_release_expected_team ):
123
78
check_review_requirements_file (capsys , test_breaking_change_release_expected_team )
124
79
125
80
126
- def test_find_mandatory_reviewers_no_tracked_changed (capsys , not_strategic_not_tracked_change_expected_team ):
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 )
81
+ def test_find_mandatory_reviewers_no_tracked_changed (capsys , not_tracked_change_expected_team ):
82
+ check_review_requirements_file (capsys , not_tracked_change_expected_team )
0 commit comments