|
44 | 44 | for i in range(len(stop_on_index), len(stop_on_index) + number_of_uploads): |
45 | 45 | stop_on_index.append((f"TESTERROR-stub_get_object_regular", i)) |
46 | 46 |
|
| 47 | +current_stop_on_index_length = len(stop_on_index) |
| 48 | +stop_on_index.extend([ |
| 49 | + ("TESTERROR-stub_put_object_other_object", current_stop_on_index_length), |
| 50 | + ("TESTERROR-stub_put_object_other_object", current_stop_on_index_length + 1), |
| 51 | + ("TESTERROR-stub_put_object_alt_object", current_stop_on_index_length + 2), |
| 52 | + ("TESTERROR-stub_put_object_alt_object", current_stop_on_index_length + 3), |
| 53 | + ("TESTERROR-stub_put_object_other_alt_object", current_stop_on_index_length + 4), |
| 54 | + ("TESTERROR-stub_put_object_other_alt_object", current_stop_on_index_length + 5), |
| 55 | + ("TESTERROR-stub_list_objects_directory", current_stop_on_index_length + 6), |
| 56 | + ("TESTERROR-stub_list_objects_regular", current_stop_on_index_length + 7), |
| 57 | + ("TESTERROR-stub_list_objects_directory", current_stop_on_index_length + 8), |
| 58 | + ("TESTERROR-stub_delete_objects_directory", current_stop_on_index_length + 9), |
| 59 | +]) |
| 60 | + |
47 | 61 | @pytest.mark.parametrize( |
48 | 62 | "error_code, stop_on_index", |
49 | 63 | stop_on_index, |
@@ -98,12 +112,19 @@ def test_s3_express_scenario( |
98 | 112 | } |
99 | 113 |
|
100 | 114 | object_name = "basic-text-object" |
| 115 | + other_object = f"other/{object_name}" |
| 116 | + alt_object = f"alt/{object_name}" |
| 117 | + other_alt_object = f"other/alt/{object_name}" |
| 118 | + |
| 119 | + object_keys = [object_name, other_object, alt_object, other_alt_object] |
| 120 | + |
101 | 121 | inputs = [ |
102 | 122 | "y", |
103 | 123 | bucket_name_prefix, |
104 | 124 | "1", |
105 | 125 | "y", |
106 | | - number_of_uploads |
| 126 | + number_of_uploads, |
| 127 | + "y" |
107 | 128 | ] |
108 | 129 | monkeypatch.setattr("builtins.input", lambda x: inputs.pop(0)) |
109 | 130 |
|
@@ -131,6 +152,20 @@ def test_s3_express_scenario( |
131 | 152 | for _ in range(number_of_uploads): |
132 | 153 | runner.add(s3_stubber.stub_get_object, regular_bucket_name, object_name) |
133 | 154 |
|
| 155 | + runner.add (s3_stubber.stub_put_object, regular_bucket_name, other_object, "") |
| 156 | + runner.add (s3_stubber.stub_put_object, directory_bucket_name, other_object, "") |
| 157 | + runner.add (s3_stubber.stub_put_object, regular_bucket_name, alt_object, "") |
| 158 | + runner.add (s3_stubber.stub_put_object, directory_bucket_name, alt_object, "") |
| 159 | + runner.add (s3_stubber.stub_put_object, regular_bucket_name, other_alt_object, "") |
| 160 | + runner.add (s3_stubber.stub_put_object, directory_bucket_name, other_alt_object, "") |
| 161 | + |
| 162 | + runner.add(s3_stubber.stub_list_objects_v2, directory_bucket_name, object_keys) |
| 163 | + runner.add(s3_stubber.stub_list_objects_v2, regular_bucket_name, object_keys) |
| 164 | + |
| 165 | + runner.add(s3_stubber.stub_list_objects_v2, directory_bucket_name, object_keys) |
| 166 | + runner.add(s3_stubber.stub_delete_objects, directory_bucket_name, object_keys) |
| 167 | + |
| 168 | + |
134 | 169 | def mock_wait(self, **kwargs): |
135 | 170 | return |
136 | 171 |
|
|
0 commit comments