Stop the AWS SDK from trying to contact the EC2 metadata server. Otherwise, this causes a 5 second delay in tests that exercise the S3 filesystem.
(monkeypatch)
| 135 | |
| 136 | @pytest.fixture(autouse=True) |
| 137 | def disable_aws_metadata(monkeypatch): |
| 138 | """Stop the AWS SDK from trying to contact the EC2 metadata server. |
| 139 | |
| 140 | Otherwise, this causes a 5 second delay in tests that exercise the |
| 141 | S3 filesystem. |
| 142 | """ |
| 143 | monkeypatch.setenv("AWS_EC2_METADATA_DISABLED", "true") |
| 144 | |
| 145 | |
| 146 | # TODO(kszucs): move the following fixtures to test_fs.py once the previous |
nothing calls this directly
no outgoing calls
no test coverage detected